fx-compat: Fix New Item menu and serializePersist()
`document.getElementsByAttribute` → `document.querySelectorAll`
This commit is contained in:
parent
9222b939ab
commit
13b9837524
1 changed files with 3 additions and 3 deletions
|
@ -278,10 +278,10 @@ var ZoteroPane = new function()
|
|||
return;
|
||||
}
|
||||
|
||||
var addMenu = document.getElementById('zotero-tb-add').firstChild;
|
||||
var addMenu = document.getElementById('zotero-tb-add').firstElementChild;
|
||||
|
||||
// Remove all nodes so we can regenerate
|
||||
var options = addMenu.getElementsByAttribute("class", "zotero-tb-add");
|
||||
var options = addMenu.querySelectorAll('.zotero-tb-add');
|
||||
while (options.length) {
|
||||
var p = options[0].parentNode;
|
||||
p.removeChild(options[0]);
|
||||
|
@ -5377,7 +5377,7 @@ var ZoteroPane = new function()
|
|||
catch (e) {
|
||||
serializedValues = {};
|
||||
}
|
||||
for (let el of document.getElementsByAttribute("zotero-persist", "*")) {
|
||||
for (let el of document.querySelectorAll("[zotero-persist]")) {
|
||||
if (!el.getAttribute) continue;
|
||||
var id = el.getAttribute("id");
|
||||
if (!id) continue;
|
||||
|
|
Loading…
Reference in a new issue