Log timing info for copying bibliography to clipboard and CSL Preview
This commit is contained in:
parent
24104dc685
commit
f3a71a2c09
2 changed files with 8 additions and 1 deletions
|
@ -743,6 +743,8 @@ var Zotero_File_Interface = new function() {
|
|||
* @param {Boolean} [asCitations=false] - Copy citation cluster instead of bibliography
|
||||
*/
|
||||
this.copyItemsToClipboard = function (items, style, locale, asHTML, asCitations) {
|
||||
var d = new Date();
|
||||
|
||||
// copy to clipboard
|
||||
var transferable = Components.classes["@mozilla.org/widget/transferable;1"].
|
||||
createInstance(Components.interfaces.nsITransferable);
|
||||
|
@ -792,6 +794,8 @@ var Zotero_File_Interface = new function() {
|
|||
transferable.setTransferData("text/unicode", str, output.length * 2);
|
||||
|
||||
clipboardService.setData(transferable, null, Components.interfaces.nsIClipboard.kGlobalClipboard);
|
||||
|
||||
Zotero.debug(`Copied bibliography to clipboard in ${new Date() - d} ms}`);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ var Zotero_CSL_Preview = new function() {
|
|||
progressWin.show();
|
||||
progressWin.startCloseTimer();
|
||||
var f = function() {
|
||||
var d = new Date();
|
||||
var styles = Zotero.Styles.getVisible();
|
||||
// XXX needs its own string really for the title!
|
||||
var str = '<html><head><title></title></head><body>';
|
||||
|
@ -78,7 +79,9 @@ var Zotero_CSL_Preview = new function() {
|
|||
}
|
||||
|
||||
str += '</body></html>';
|
||||
iframe.contentDocument.documentElement.innerHTML = str;
|
||||
iframe.contentDocument.documentElement.innerHTML = str;
|
||||
|
||||
Zotero.debug(`Generated previews in ${new Date() - d} ms`);
|
||||
};
|
||||
// Give progress window time to appear
|
||||
setTimeout(f, 100);
|
||||
|
|
Loading…
Add table
Reference in a new issue