diff --git a/chrome/content/zotero/preferences/preferences_cite.jsx b/chrome/content/zotero/preferences/preferences_cite.jsx index 0eee275765..43aad931c6 100644 --- a/chrome/content/zotero/preferences/preferences_cite.jsx +++ b/chrome/content/zotero/preferences/preferences_cite.jsx @@ -140,18 +140,20 @@ Zotero_Preferences.Cite = { openStylesPage: function () { - Zotero.openInViewer("https://www.zotero.org/styles/", function (doc) { - // Hide header, intro paragraph, Link, and Source - // - // (The first two aren't sent to the client normally, but hide anyway in case they are.) - var style = doc.createElement('style'); - style.type = 'text/css'; - style.innerHTML = 'h1, #intro, .style-individual-link, .style-view-source { display: none !important; }' - // TEMP: Default UA styles that aren't being included in Firefox 60 for some reason - + 'html { background: #fff; }' - + 'a { color: rgb(0, 0, 238) !important; text-decoration: underline; }' - + 'a:active { color: rgb(238, 0, 0) !important; }'; - doc.getElementsByTagName('head')[0].appendChild(style); + Zotero.openInViewer("https://www.zotero.org/styles/", { + onLoad(doc) { + // Hide header, intro paragraph, Link, and Source + // + // (The first two aren't sent to the client normally, but hide anyway in case they are.) + var style = doc.createElement('style'); + style.type = 'text/css'; + style.innerHTML = 'h1, #intro, .style-individual-link, .style-view-source { display: none !important; }' + // TEMP: Default UA styles that aren't being included in Firefox 60 for some reason + + 'html { background: #fff; }' + + 'a { color: rgb(0, 0, 238) !important; text-decoration: underline; }' + + 'a:active { color: rgb(238, 0, 0) !important; }'; + doc.getElementsByTagName('head')[0].appendChild(style); + } }); }, diff --git a/chrome/content/zotero/preferences/preferences_cite.xhtml b/chrome/content/zotero/preferences/preferences_cite.xhtml index 9be73bdaa7..b4f1e4662a 100644 --- a/chrome/content/zotero/preferences/preferences_cite.xhtml +++ b/chrome/content/zotero/preferences/preferences_cite.xhtml @@ -61,10 +61,10 @@