diff --git a/chrome/content/zotero/note.js b/chrome/content/zotero/note.js index c4cb38ecc..0de594413 100644 --- a/chrome/content/zotero/note.js +++ b/chrome/content/zotero/note.js @@ -34,17 +34,12 @@ function onLoad() { // Set font size from pref Zotero.setFontSize(noteEditor); - var params = []; - var b = document.location.href.substr(document.location.href.indexOf('?')+1).split('&'); - for(var i = 0; i < b.length; i++) - { - var mid = b[i].indexOf('='); - - params[b[i].substr(0,mid)] = b[i].substr(mid+1); + if (window.arguments) { + var io = window.arguments[0]; } - var itemID = params.id; - var collectionID = params.coll; - var parentItemID = params.p; + var itemID = io.itemID; + var collectionID = io.collectionID; + var parentItemID = io.parentItemID; if (itemID) { var ref = Zotero.Items.get(itemID); diff --git a/chrome/content/zotero/note.xul b/chrome/content/zotero/note.xul index 2a83fd819..ec4ea7e4b 100644 --- a/chrome/content/zotero/note.xul +++ b/chrome/content/zotero/note.xul @@ -11,6 +11,7 @@ height="350" title="&zotero.items.menu.attach.note;" persist="screenX screenY width height" + windowtype="zotero:note" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">