Scaffold: Fix copying JSON test data
Previously only copied '[object Object]'.
This commit is contained in:
parent
b9a5fd9f78
commit
42e042c6c6
1 changed files with 3 additions and 0 deletions
|
@ -1729,6 +1729,9 @@ var Scaffold = new function () {
|
|||
var url = item.getElementsByTagName("listcell")[0].getAttribute("label");
|
||||
var test = JSON.parse(item.getUserData("test-string"));
|
||||
var urlOrData = (test.input !== undefined) ? test.input : url;
|
||||
if (typeof urlOrData !== 'string') {
|
||||
urlOrData = JSON.stringify(urlOrData, null, '\t');
|
||||
}
|
||||
Zotero.Utilities.Internal.copyTextToClipboard(urlOrData);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue