Hallo
Habe soeben auf FF 69 upgedatet und es funktionieren einige Scripte nicht mehr. Andere habe ich durch Änderung von. browser.xul in browser.xhtml hinbekommen.
Hier die die nicht mehr funktionieren:
Statusbaruhr - ist mit der Antwort von "milupo" erledigt!
CSS
(function() {
function doDatClock() {
var timestr = new Date().toLocaleDateString( locale , options );
const blanks = ' ';
let i = timestr.lastIndexOf(',');
timestr = timestr.substring(0,i) + blanks + timestr.substring(i+1);
if( count == 1 ) {
var counter = new Date( 1000 * sec ).toISOString().substr( 11 , 8 ); // .replace(/^[0:]+/, '') // if you want to replace zeroes and colons
timestr = timestr + ' (' + counter + ')';
sec++;
}
ClockLabel.setAttribute( 'value', timestr );
}
var count = 1; // if you don't want a counter set this to zero
var agent = 1; // if you just want the clock set this to zero
var language = 'de-DE'; // locale, e.g. 'de-DE' , 'en-US' , 'fr-FR'
var personalText = ''; // your personal text here
var cssColor = 'black'; // Font Color
var css = 'margin-left: 30px; padding-top: 4px !important; padding-left: 0px; color: ' + cssColor + '; font-weight: 600; text-shadow: none; width: 275px;';
var cssA = 'margin-left: 90px; width: auto;';
var options = {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
};
var sec = 0;
var locale = language || window.navigator.languages[0];
var position = document.getElementById('helpMenu');
var ClockLabel = document.createElement('label');
ClockLabel.setAttribute('id', 'statusbar-clock-display');
ClockLabel.setAttribute('class', 'statusbarpanel-text');
ClockLabel.setAttribute('style', css);
position.parentNode.insertBefore(ClockLabel, position.nextSibling);
if( agent == 1 ) {
var AgentLabel = document.createElement('label');
AgentLabel.setAttribute('id', 'statusbar-agent-display');
AgentLabel.setAttribute('class', 'statusbarpanel-text');
AgentLabel.setAttribute('style', css + cssA);
var FFstr = window.navigator.userAgent.split(' ');
var FF = FFstr[FFstr.length-1].replace( '/' , ' ' );
var text = " Firefox - G Profile " + AppConstants.MOZ_APP_VERSION_DISPLAY;
AgentLabel.setAttribute( 'value', text );
position.parentNode.insertBefore(AgentLabel, position.nextSibling);
}
if( count == 1 ) {
ClockLabel.addEventListener('dblclick', function() { sec = 0; });
}
window.setInterval( doDatClock , 1000 );
})();
Alles anzeigen
Statusleiste - ist mit der Antwort von "milupo" erledigt!
Code
(function() {
if (location != 'chrome://browser/content/browser.xul')
return;
var tb = document.createElement('toolbar');
tb.id = 'new-toolbar';
tb.setAttribute('customizable', true);
tb.setAttribute('mode', 'icons');
var vbox = document.createElement('vbox');
vbox.id = 'new-toolbar-vbox';
document.getElementById('navigator-toolbox').parentNode.insertBefore(
vbox, document.getElementById('browser-bottombox'));
vbox.appendChild(tb);
CustomizableUI.registerArea('new-toolbar', {legacy: true});
})();
Alles anzeigen
wenn ich da Browser.xul in Browser.xhtml ändere spielt FF verrückt.
TabFocus - ist hiermit [Mein Hauptproblem ist gelöst] Fx 69 und Scripte gehen nicht mehr #30 erledigt.
Code
// ==UserScript==
// @name TabFocus.uc.js
// @startup window.tab_hover.onLoad();
// @shutdown window.tab_hover.onUnload();
// @version 2014.8.23
// @note 修改为无需重启的方式
// ==/UserScript==
if (window.tab_hover) {
window.tab_hover.onUnload();
delete window.tab_hover;
}
window.tab_hover = {
delay: 1,
event: null,
tid: null,
onLoad: function() {
gBrowser.tabContainer.addEventListener("mouseout", tab_hover.onMouseOut, false);
gBrowser.tabContainer.addEventListener("mouseover", tab_hover.onMouseOver, false);
// 右键点击则暂停 focus,但由于点击的相应时间问题,可能会更混乱
// gBrowser.tabContainer.addEventListener("click", tab_hover.onMouseClicked, false);
},
onUnload: function() {
gBrowser.tabContainer.removeEventListener("mouseover", tab_hover.onMouseOver, false);
gBrowser.tabContainer.removeEventListener("mouseout", tab_hover.onMouseOut, false);
// gBrowser.tabContainer.removeEventListener("click", tab_hover.onMouseClicked, false);
},
onMouseOver: function(event) {
tab_hover.event = event.target;
tab_hover.tid = setTimeout(function() {
gBrowser.selectedTab = tab_hover.event;
tab_hover.event=null;
}, tab_hover.delay);
},
onMouseOut: function() {
if (tab_hover.tid) {
clearTimeout(tab_hover.tid);
tab_hover.tid = null;
}
},
onMouseClicked: function() {
if (tab_hover.tid) {
clearTimeout(tab_hover.tid);
tab_hover.tid = null;
}
},
};
tab_hover.onLoad();
Alles anzeigen
TabNummer - dank milupo erledigt. Siehe #15
Code
// ==UserScript==
// @name Numbered Tabs
// @namespace http://anttirt.net/
// @description Adds numbers to tab labels (useful with eg. Pentadactyl)
// @include main
// @compatibility Firefox 4.0
// @author anttirt
// @version 1.0b
// @homepage https://github.com/anttirt/numbered-tabs-firefox
// ==/UserScript==
(function() {
var stripPat = /^\d\d* /;
var container = gBrowser.tabContainer;
function update(event) {
var tab = event.target;
if(typeof tab.tabIndex == "undefined") {
updateAll();
}
else {
tab.label = String(tab.tabIndex) + " " + tab.label.replace(stripPat, "");
}
}
function updateAll(event) {
var skip = false;
for(var i = 0; i < container.childNodes.length; ++i) {
var tab = container.childNodes[i];
if(event.type == "TabClose" && tab == event.target) {
skip = true;
continue;
}
tab.tabIndex = i + (skip ? 0 : 1);
tab.label = String(tab.tabIndex) + " " + tab.label.replace(stripPat, "");
}
}
container.addEventListener("TabAttrModified", update, false);
container.addEventListener("TabOpen", updateAll, false);
container.addEventListener("TabMove", updateAll, false);
container.addEventListener("TabClose", updateAll, false);
})();
z
Alles anzeigen
Danke schon mal im voraus hwww