- Firefox-Version
- 112.0.1
- Betriebssystem
- Windows 11 Home (64-Bit)
Hallo ihr..
In dem Script mit dem Firefox version, datum und zeit im menübar sind bei mir die Schrift und das Icon übereinander.
Habe die schrift mit dem datum und zeit verschoben können, aber die schrift mit firefox version ist immernoch auf dem icon (siehe Bild).
Kann mir jemand sagen wo ich das ändern kann?
Hier noch das Script:
JavaScript
(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) + ' Uhr';
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 = 0; // 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 cssFontFamily = 'DejaVu Sans';
var cssColor = 'white'; // Font Color
var bitnr = ` (${Services.appinfo.is64Bit ? 64 : 32}-bit)`;
var css = 'padding-top: 5px; padding-left: 0;margin-right:2px;margin-left:4px; color: ' + cssColor + '; font-family: ' + cssFontFamily + '; font-weight:500; font-size:12px; text-shadow: none; width: 340px;';
var cssA = 'text-align: right; background: url("file:///C:/Users/Ramo/AppData/Roaming/Mozilla/Firefox/Profiles/g4mso52s.default-release/chrome/Icons/firefox.png")no-repeat !important; background-position: 5px 2px !important; min-height: 20px; max-height: 20px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px !important; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; width: 248px;';
var options = {
weekday: 'long',
year: 'numeric',
month: 'short',
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'); // Datumsangabe in Menüleiste
// var position = document.getElementById('urlbar-container'); // Datumsangabe in Symbolleiste hinter Adressleiste
var ClockLabel = document.createXULElement('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.createXULElement('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 Version: " + gAppInfo.version + personalText;
// Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo).QueryInterface(Ci.nsIXULRuntime);
var text = " Firefox Version: " + AppConstants.MOZ_APP_VERSION_DISPLAY + bitnr + personalText;
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