-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
349dd8b
commit 42ceebe
Showing
5 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-return */ | ||
declare const Zotero: IZotero | ||
|
||
export function debug(...msg) { | ||
const str = `PubPeer: ${msg.map(s => s.toString()).join(' ')}` | ||
function to_s(obj: any): string { | ||
if (typeof obj === 'string') return obj | ||
const s = `${obj}` | ||
switch (s) { | ||
case '[object Object]': | ||
return JSON.stringify(obj) | ||
case '[object Set]': | ||
return JSON.stringify(Array.from(obj)) // eslint-disable-line @typescript-eslint/no-unsafe-argument | ||
default: | ||
return s | ||
} | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
export function debug(...msg): void { | ||
const str = `Cite Columns: ${msg.map(to_s).join(' ')}` | ||
// console.error(str) // tslint:disable-line:no-console | ||
Zotero.debug(str) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
itemPane.summary = <p>{{total_comments}} <b>PubPeer</b> comments.</p><p><a href="{{url}}">{{url}}</a></p><p>Most recent comment on {{last_commented_at}}</p> | ||
itemPane.summary = <p>{{total_comments}} <b>PubPeer</b> comments.</p><p><a href="#" url="{{url}}">{{url}}</a></p><p>Most recent comment on {{last_commented_at}}</p> | ||
itemPane.noComment = No <b>PubPeer</b> comments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters