Remove antiquated code
This commit is contained in:
parent
c6d2d823f0
commit
ac5d833117
7 changed files with 51 additions and 293 deletions
|
@ -27,10 +27,6 @@
|
|||
padding-left: 0;
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) .zotero-tb-button, .zotero-tb-button[disabled="true"]{
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.zotero-tb-button:-moz-window-inactive {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
@ -128,7 +124,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#zotero-pane[ignoreActiveAttribute] #zotero-view-tabbox > tabs > tab {
|
||||
#zotero-pane #zotero-view-tabbox > tabs > tab {
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: center;
|
||||
-moz-appearance: toolbarbutton;
|
||||
|
@ -138,7 +134,7 @@
|
|||
padding: 3px 1px 3px 1px;
|
||||
}
|
||||
|
||||
#zotero-pane[ignoreActiveAttribute] #zotero-view-tabbox > tabs > tab > hbox .tab-text {
|
||||
#zotero-pane #zotero-view-tabbox > tabs > tab > hbox .tab-text {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
margin: 2px 7px 2px 9px !important;
|
||||
|
@ -146,157 +142,15 @@
|
|||
}
|
||||
|
||||
/* This seems to be necessary to center the tabs. Not sure why. */
|
||||
#zotero-pane[ignoreActiveAttribute] #zotero-view-tabbox > tabs > tab:last-of-type > hbox .tab-text {
|
||||
#zotero-pane #zotero-view-tabbox > tabs > tab:last-of-type > hbox .tab-text {
|
||||
margin: 2px 9px 2px 9px !important;
|
||||
}
|
||||
|
||||
#zotero-pane[ignoreActiveAttribute] #zotero-view-tabbox > tabs > tab[selected=true] > hbox .tab-text {
|
||||
#zotero-pane #zotero-view-tabbox > tabs > tab[selected=true] > hbox .tab-text {
|
||||
color: #FFF !important;
|
||||
text-shadow: rgba(0, 0, 0, 0.4) 0 1px;
|
||||
}
|
||||
|
||||
/** RULES FOR FX 3.6 **/
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab > hbox .tab-text {
|
||||
text-shadow: rgba(255, 255, 255, 0.4) 0 1px !important;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:active:hover > hbox > .tab-text,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[selected=true] > hbox > .tab-text {
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab {
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: center;
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
padding: 3px 0 1px;
|
||||
background-color: transparent;
|
||||
border: solid transparent;
|
||||
border-width: 0 4px 0 5px;
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-middle.png") 0 4 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:active:hover {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-middle-down.png") 0 4 0 5 repeat stretch;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[selected=true] {
|
||||
color: #FFF !important;
|
||||
text-shadow: rgba(0, 0, 0, 0.4) 0 1px;
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-middle-selected.png") 0 4 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[selected=true]:active:hover {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-middle-selected-down.png") 0 4 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > * {
|
||||
color: #7C7C7C !important;
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-middle-inactive.png") 0 4 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[selected=true] {
|
||||
color: #FFF !important;
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-middle-selected-inactive.png") 0 4 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > :first-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > [first-visible],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > :last-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > [last-visible] {
|
||||
border-width: 0 4px 0 6px;
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-left.png") 0 4 0 6 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > :first-child:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > [first-visible]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > :last-child:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > [last-visible]:active:hover {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-left-down.png") 0 4 0 6 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:first-child[selected=true],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[first-visible][selected=true],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab:last-child[selected=true],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab[last-visible][selected=true] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-left-selected.png") 0 4 0 6 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:first-child[selected=true]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[first-visible][selected=true]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab:last-child[selected=true]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab[last-visible][selected=true]:active:hover {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-left-selected-down.png") 0 4 0 6 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > :first-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > [first-visible],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > :last-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > [last-visible] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-left-inactive.png") 0 4 0 6 repeat stretch;
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:first-child[selected=true],
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[first-visible][selected=true],
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab:last-child[selected=true],
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab[last-visible][selected=true] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-left-selected-inactive.png") 0 4 0 6 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > :last-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > [last-visible],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > :first-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > [first-visible] {
|
||||
border-width: 0 6px 0 5px;
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > :last-child:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > [last-visible]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > :first-child:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > [first-visible]:active:hover {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right-down.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:last-child[selected=true],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[last-visible][selected=true],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab:first-child[selected=true],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab[first-visible][selected=true] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right-selected.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:last-child[selected=true]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[last-visible][selected=true]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab:first-child[selected=true]:active:hover,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab[first-visible][selected=true]:active:hover {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right-selected-down.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > :last-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > [last-visible],
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > :first-child,
|
||||
#zotero-pane:not([ignoreActiveAttribute]) :root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > [first-visible] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right-inactive.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
#zotero-view-tabbox:-moz-window-inactive > tabs > tab:last-child[selected=true],
|
||||
#zotero-view-tabbox:-moz-window-inactive > tabs > tab[last-visible][selected=true],
|
||||
#zotero-view-tabbox:-moz-window-inactive > tabs[chromedir=rtl] > tab:first-child[selected=true],
|
||||
#zotero-view-tabbox:-moz-window-inactive > tabs[chromedir=rtl] > tab[first-visible][selected=true] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right-selected-inactive.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab:last-child[selected=true],
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs > tab[last-visible][selected=true],
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab:first-child[selected=true],
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-view-tabbox > tabs[chromedir=rtl] > tab[first-visible][selected=true] {
|
||||
-moz-border-image: url("chrome://zotero/skin/mac/viewbutton-right-selected-inactive.png") 0 6 0 5 repeat stretch;
|
||||
}
|
||||
/** END RULES FOR FX 3.6 **/
|
||||
|
||||
#zotero-collections-tree {
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
|
@ -310,10 +164,6 @@
|
|||
background-color: rgb(232, 232, 232);
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) #zotero-collections-tree {
|
||||
background-color: rgb(232, 232, 232);
|
||||
}
|
||||
|
||||
#zotero-collections-tree treechildren::-moz-tree-row {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
|
@ -329,11 +179,6 @@
|
|||
border-top: 1px solid #979797;
|
||||
}
|
||||
|
||||
:root:not([active]) #zotero-pane:not([ignoreActiveAttribute]) treechildren::-moz-tree-cell(selected) {
|
||||
background: -moz-linear-gradient(top, #B4B4B4, #8A8A8A) repeat-x;
|
||||
border-top: 1px solid #979797;
|
||||
}
|
||||
|
||||
#zotero-collections-tree treechildren::-moz-tree-cell(selected, focus) {
|
||||
background: -moz-linear-gradient(top, #6494D4, #2559AC) repeat-x;
|
||||
border-top: 1px solid #5382C5;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
var ZoteroOverlay = new function()
|
||||
{
|
||||
const DEFAULT_ZPANE_HEIGHT = 300;
|
||||
var toolbarCollapseState, isFx36, showInPref;
|
||||
var toolbarCollapseState, showInPref;
|
||||
var zoteroPane, zoteroSplitter;
|
||||
var _stateBeforeReload = false;
|
||||
|
||||
|
@ -44,36 +44,31 @@ var ZoteroOverlay = new function()
|
|||
ZoteroPane_Overlay = ZoteroPane;
|
||||
ZoteroPane.init();
|
||||
|
||||
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo);
|
||||
isFx36 = appInfo.platformVersion.indexOf('1.9') === 0;
|
||||
|
||||
// Open Zotero app tab, if in Fx 4 and requested by pref
|
||||
showInPref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService)
|
||||
.getBranch('extensions.zotero.').getIntPref('showIn');
|
||||
this.isTab = showInPref !== 1;
|
||||
if(!isFx36) {
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
var zoteroObserver = function(subject, topic, data) {
|
||||
if(subject != window) return;
|
||||
observerService.removeObserver(this, "browser-delayed-startup-finished");
|
||||
if(showInPref === 3) {
|
||||
var tabbar = document.getElementById("TabsToolbar");
|
||||
if(tabbar && window.getComputedStyle(tabbar).display !== "none") {
|
||||
// load Zotero as a tab, if it isn't loading by default
|
||||
ZoteroOverlay.loadZoteroTab(true);
|
||||
}
|
||||
} else if(showInPref === 1) {
|
||||
// close Zotero as a tab, in case it was pinned
|
||||
var zoteroTab = ZoteroOverlay.findZoteroTab();
|
||||
if(zoteroTab) gBrowser.removeTab(zoteroTab);
|
||||
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
var zoteroObserver = function(subject, topic, data) {
|
||||
if(subject != window) return;
|
||||
observerService.removeObserver(this, "browser-delayed-startup-finished");
|
||||
if(showInPref === 3) {
|
||||
var tabbar = document.getElementById("TabsToolbar");
|
||||
if(tabbar && window.getComputedStyle(tabbar).display !== "none") {
|
||||
// load Zotero as a tab, if it isn't loading by default
|
||||
ZoteroOverlay.loadZoteroTab(true);
|
||||
}
|
||||
};
|
||||
|
||||
observerService.addObserver(zoteroObserver, "browser-delayed-startup-finished", false);
|
||||
}
|
||||
} else if(showInPref === 1) {
|
||||
// close Zotero as a tab, in case it was pinned
|
||||
var zoteroTab = ZoteroOverlay.findZoteroTab();
|
||||
if(zoteroTab) gBrowser.removeTab(zoteroTab);
|
||||
}
|
||||
};
|
||||
|
||||
observerService.addObserver(zoteroObserver, "browser-delayed-startup-finished", false);
|
||||
|
||||
// Make Zotero icon visible, if requested
|
||||
var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
|
@ -149,9 +144,7 @@ var ZoteroOverlay = new function()
|
|||
}
|
||||
|
||||
// Hide browser chrome on Zotero tab
|
||||
if(Zotero.isFx4) {
|
||||
XULBrowserWindow.inContentWhitelist.push("chrome://zotero/content/tab.xul");
|
||||
}
|
||||
XULBrowserWindow.inContentWhitelist.push("chrome://zotero/content/tab.xul");
|
||||
|
||||
// Close pane if connector is enabled
|
||||
ZoteroPane_Local.addReloadListener(function() {
|
||||
|
@ -309,7 +302,7 @@ var ZoteroOverlay = new function()
|
|||
// If no existing tab, add a new tab
|
||||
if(!tab) tab = gBrowser.addTab(ZOTERO_TAB_URL);
|
||||
// Pin tab
|
||||
if(!isFx36 && showInPref == 3) gBrowser.pinTab(tab);
|
||||
if(showInPref == 3) gBrowser.pinTab(tab);
|
||||
// If requested, activate tab
|
||||
if(!background) gBrowser.selectedTab = tab;
|
||||
}
|
||||
|
|
|
@ -429,12 +429,7 @@ Zotero.Fulltext = new function(){
|
|||
|
||||
var args = [file.path, infoFile.path];
|
||||
try {
|
||||
if (!Zotero.isFx36) {
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
else {
|
||||
proc.run(true, args, args.length);
|
||||
}
|
||||
proc.runw(true, args, args.length);
|
||||
var totalPages = this.getTotalPagesFromFile(itemID);
|
||||
}
|
||||
catch (e) {
|
||||
|
@ -465,12 +460,7 @@ Zotero.Fulltext = new function(){
|
|||
}
|
||||
args.push(file.path, cacheFile.path);
|
||||
try {
|
||||
if (!Zotero.isFx36) {
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
else {
|
||||
proc.run(true, args, args.length);
|
||||
}
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug("Error running pdftotext");
|
||||
|
|
|
@ -94,35 +94,15 @@ Zotero.HTTP = new function() {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Workaround for "Accept third-party cookies" being off in Firefox 3.0.1
|
||||
// https://www.zotero.org/trac/ticket/1070
|
||||
if (Zotero.isFx30) {
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
var ds = Cc["@mozilla.org/webshell;1"].
|
||||
createInstance(Components.interfaces.nsIDocShellTreeItem).
|
||||
QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
ds.itemType = Ci.nsIDocShellTreeItem.typeContent;
|
||||
var xmlhttp = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
|
||||
createInstance(Ci.nsIXMLHttpRequest);
|
||||
xmlhttp.mozBackgroundRequest = true;
|
||||
xmlhttp.open("POST", url, true);
|
||||
xmlhttp.channel.loadGroup = ds.getInterface(Ci.nsILoadGroup);
|
||||
xmlhttp.channel.loadFlags |= Ci.nsIChannel.LOAD_DOCUMENT_URI;
|
||||
}
|
||||
else {
|
||||
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance();
|
||||
// Prevent certificate/authentication dialogs from popping up
|
||||
xmlhttp.mozBackgroundRequest = true;
|
||||
xmlhttp.open('POST', url, true);
|
||||
// Send cookie even if "Allow third-party cookies" is disabled (>=Fx3.6 only)
|
||||
if (!Zotero.isFx35) {
|
||||
var channel = xmlhttp.channel;
|
||||
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||
channel.forceAllowThirdPartyCookie = true;
|
||||
}
|
||||
}
|
||||
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance();
|
||||
// Prevent certificate/authentication dialogs from popping up
|
||||
xmlhttp.mozBackgroundRequest = true;
|
||||
xmlhttp.open('POST', url, true);
|
||||
// Send cookie even if "Allow third-party cookies" is disabled (>=Fx3.6 only)
|
||||
var channel = xmlhttp.channel;
|
||||
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||
channel.forceAllowThirdPartyCookie = true;
|
||||
|
||||
if (headers) {
|
||||
if (typeof headers == 'string') {
|
||||
|
@ -186,34 +166,15 @@ Zotero.HTTP = new function() {
|
|||
|
||||
// Workaround for "Accept third-party cookies" being off in Firefox 3.0.1
|
||||
// https://www.zotero.org/trac/ticket/1070
|
||||
if (Zotero.isFx30) {
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
var ds = Cc["@mozilla.org/webshell;1"].
|
||||
createInstance(Components.interfaces.nsIDocShellTreeItem).
|
||||
QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
ds.itemType = Ci.nsIDocShellTreeItem.typeContent;
|
||||
var xmlhttp = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
|
||||
createInstance(Ci.nsIXMLHttpRequest);
|
||||
// Prevent certificate/authentication dialogs from popping up
|
||||
xmlhttp.mozBackgroundRequest = true;
|
||||
xmlhttp.open("HEAD", url, true);
|
||||
xmlhttp.channel.loadGroup = ds.getInterface(Ci.nsILoadGroup);
|
||||
xmlhttp.channel.loadFlags |= Ci.nsIChannel.LOAD_DOCUMENT_URI;
|
||||
}
|
||||
else {
|
||||
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance();
|
||||
// Prevent certificate/authentication dialogs from popping up
|
||||
xmlhttp.mozBackgroundRequest = true;
|
||||
xmlhttp.open('HEAD', url, true);
|
||||
// Send cookie even if "Allow third-party cookies" is disabled (>=Fx3.6 only)
|
||||
if (!Zotero.isFx35) {
|
||||
var channel = xmlhttp.channel;
|
||||
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||
channel.forceAllowThirdPartyCookie = true;
|
||||
}
|
||||
}
|
||||
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance();
|
||||
// Prevent certificate/authentication dialogs from popping up
|
||||
xmlhttp.mozBackgroundRequest = true;
|
||||
xmlhttp.open('HEAD', url, true);
|
||||
// Send cookie even if "Allow third-party cookies" is disabled (>=Fx3.6 only)
|
||||
var channel = xmlhttp.channel;
|
||||
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||
channel.forceAllowThirdPartyCookie = true;
|
||||
|
||||
if (requestHeaders) {
|
||||
for (var header in requestHeaders) {
|
||||
|
@ -556,7 +517,7 @@ Zotero.HTTP = new function() {
|
|||
if(typeof(urls) == "string") urls = [urls];
|
||||
|
||||
var prevUrl;
|
||||
var loadEvent = Zotero.isFx2 ? "load" : "pageshow";
|
||||
var loadEvent = "pageshow";
|
||||
|
||||
var hiddenBrowser = Zotero.Browser.createHiddenBrowser();
|
||||
hiddenBrowser.addEventListener(loadEvent, onLoad, true);
|
||||
|
|
|
@ -1294,10 +1294,6 @@ Zotero.Translate.Base.prototype = {
|
|||
* @param {Integer} level Log level (1-5, higher numbers are higher priority)
|
||||
*/
|
||||
"_debug":function(string, level) {
|
||||
if(typeof string === "object" && Zotero.isFx36 && !Zotero.isBookmarklet) {
|
||||
string = new XPCSafeJSObjectWrapper(string);
|
||||
}
|
||||
|
||||
if(level !== undefined && typeof level !== "number") {
|
||||
Zotero.debug("debug: level must be an integer");
|
||||
return;
|
||||
|
|
|
@ -1757,12 +1757,7 @@ const ZOTERO_CONFIG = {
|
|||
for each(var menuitem in menupopup.childNodes) {
|
||||
if (menuitem.id.substr(prefixLen) == mode) {
|
||||
menuitem.setAttribute('checked', true);
|
||||
if (Zotero.isFx36) {
|
||||
searchBox.emptytext = modes[mode].label;
|
||||
}
|
||||
else {
|
||||
searchBox.placeholder = modes[mode].label;
|
||||
}
|
||||
searchBox.placeholder = modes[mode].label;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1803,12 +1798,7 @@ const ZOTERO_CONFIG = {
|
|||
button.appendChild(menupopup);
|
||||
hbox.insertBefore(button, input);
|
||||
|
||||
if (Zotero.isFx36) {
|
||||
searchBox.emptytext = modes[mode].label;
|
||||
}
|
||||
else {
|
||||
searchBox.placeholder = modes[mode].label;
|
||||
}
|
||||
searchBox.placeholder = modes[mode].label;
|
||||
|
||||
// If Alt-Up/Down, show popup
|
||||
searchBox.addEventListener("keypress", function(event) {
|
||||
|
|
|
@ -124,13 +124,6 @@ var ZoteroPane = new function()
|
|||
document.getElementById('zotero-pane-stack').setAttribute('platform', 'win');
|
||||
}
|
||||
|
||||
if(Zotero.isFx4 || window.ZoteroTab) {
|
||||
// hack, since Fx 4 no longer sets active, and the reverse in polarity of the preferred
|
||||
// property makes things painful to handle otherwise
|
||||
// DEBUG: remove this once we only support Fx 4
|
||||
zp.setAttribute("ignoreActiveAttribute", "true");
|
||||
}
|
||||
|
||||
// register an observer for Zotero reload
|
||||
observerService = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
|
@ -3469,12 +3462,7 @@ var ZoteroPane = new function()
|
|||
proc.init(exec);
|
||||
|
||||
var args = [file.path];
|
||||
if (!Zotero.isFx36) {
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
else {
|
||||
proc.run(true, args, args.length);
|
||||
}
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug(e);
|
||||
|
@ -3538,12 +3526,7 @@ var ZoteroPane = new function()
|
|||
proc.init(exec);
|
||||
|
||||
var args = [url];
|
||||
if (!Zotero.isFx36) {
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
else {
|
||||
proc.run(true, args, args.length);
|
||||
}
|
||||
proc.runw(true, args, args.length);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue