Suggestions:
Make sure all words are spelled correctly.
Try different keywords.
Try more general keywords.
Try your query on the entire web
├── .github
└── FUNDING.yml
├── src
├── icons
│ ├── favicon.png
│ └── faviconX2.png
├── prefs.js
├── locale
│ ├── zh-CH
│ │ ├── gscc.ftl
│ │ └── gscc-prefs.ftl
│ ├── ja-JP
│ │ ├── gscc.ftl
│ │ └── gscc-prefs.ftl
│ ├── en-US
│ │ ├── gscc.ftl
│ │ └── gscc-prefs.ftl
│ ├── es-ES
│ │ ├── gscc.ftl
│ │ └── gscc-prefs.ftl
│ └── fr-FR
│ │ ├── gscc.ftl
│ │ └── gscc-prefs.ftl
├── manifest.json
├── bootstrap.js
└── prefs.xhtml
├── __tests__
├── __setup__
│ ├── env.js
│ └── setupJest.js
├── __data__
│ ├── helpers.js
│ ├── zoteroItemsList.js
│ ├── zoteroItemsListSingleItemWithHtmlTitle.js
│ ├── zoteroItemsListSingleItemWithNoCreators.js
│ ├── zoteroItemsListSingleItemWithNoTitle.js
│ ├── zoteroItemsListSingleItemWithNoCount.js
│ ├── zoteroItemsListSingleItemWithCountLegacyFormat.js
│ ├── zoteroItemsListSingleItemWithCount.js
│ ├── extraFieldExtractorData.js
│ ├── zoteroItemsList10set.js
│ ├── gsResponseNoCitation.js
│ ├── gsResponseHasPaperNoCitations.js
│ ├── gsResponseHasCitation.js
│ └── gsResponseHasRecaptcha.js
├── utils.test.js
└── gsCitationCount.test.js
├── updates.json
├── .gitignore
├── package.json
├── jest.config.js
├── README.md
└── LICENSE
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [justinribeiro]
4 |
--------------------------------------------------------------------------------
/src/icons/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinribeiro/zotero-google-scholar-citation-count/HEAD/src/icons/favicon.png
--------------------------------------------------------------------------------
/src/icons/faviconX2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinribeiro/zotero-google-scholar-citation-count/HEAD/src/icons/faviconX2.png
--------------------------------------------------------------------------------
/src/prefs.js:
--------------------------------------------------------------------------------
1 | pref('extensions.zotero.gscc.useAutoCountUpdate', false);
2 | pref('extensions.zotero.gscc.useRandomWait', true);
3 | pref('extensions.zotero.gscc.randomWaitMinMs', 1000);
4 | pref('extensions.zotero.gscc.randomWaitMaxMs', 5000);
5 | pref('extensions.zotero.gscc.useSearchTitleFuzzyMatch', false);
6 | pref('extensions.zotero.gscc.useSearchAuthorsMatch', true);
7 | pref('extensions.zotero.gscc.useDateRangeMatch', false);
8 | pref(
9 | 'extensions.zotero.gscc.defaultGsApiEndpoint',
10 | 'https://scholar.google.com',
11 | );
12 |
--------------------------------------------------------------------------------
/__tests__/__setup__/env.js:
--------------------------------------------------------------------------------
1 | const Environment = require('jest-environment-jsdom').default;
2 | const { JSDOM } = require('jsdom');
3 | const dom = new JSDOM();
4 |
5 | module.exports = class CustomTestEnvironment extends Environment {
6 | async setup() {
7 | await super.setup();
8 | this.global.TextEncoder = TextEncoder;
9 | this.global.TextDecoder = TextDecoder;
10 | this.global.Response = Response;
11 | this.global.Request = Request;
12 | this.global.document = dom.window.document;
13 | this.global.window = dom.window;
14 | }
15 | };
16 |
--------------------------------------------------------------------------------
/updates.json:
--------------------------------------------------------------------------------
1 | {
2 | "addons": {
3 | "justin@justinribeiro.com": {
4 | "updates": [
5 | {
6 | "version": "4.3.0",
7 | "update_link": "https://github.com/justinribeiro/zotero-google-scholar-citation-count/releases/download/v4.3.0/zotero-google-scholar-citation-count-4.3.0.xpi",
8 | "update_hash": "sha256:36b02a09da29ecd245c7a83f7f5ae296a7cb2377ed45b2d36e2090c2b03285e0",
9 | "applications": {
10 | "zotero": {
11 | "strict_min_version": "6.999",
12 | "strict_max_version": "7.0.*"
13 | }
14 | }
15 | }
16 | ]
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/locale/zh-CH/gscc.ftl:
--------------------------------------------------------------------------------
1 | gscc-menuitem =
2 | .label = 更新 Google 学术引用次数
3 | gscc-column-name = 引用次数
4 | gscc-lastupdated-column-name = 引用计数上次更新日期
5 | gscc-relevancescore-column-name = 引用计数相对相关性得分
6 | gscc-update-all =
7 | .label = 更新所有 Google 学术引用次数。
8 | gscc-recapatcha-alert = 请在现在打开的页面上输入验证码,然后重试更新引用,或者如果没有出现验证码,请等待一段时间以解除 Google 的限制。
9 | gscc-citedByPrefix = 引用自
10 | gscc-lackPermissions = 您没有权限编辑此库。
11 | gscc-unSupportedEntryType = 不支持更新此类型条目的引用。
12 | gscc-unSupportedGroupCollection =
13 | .label = 尚未实现对组的更新。
14 | gscc-invalidGoogleScholarURL = Google 学术的 URL 格式似乎不正确;请检查“设置 > Google 学术引用计数”以验证您的 Google 学术 URL。
15 | gscc-progresswindow-title = 引用次数已更新
16 | gscc-progresswindow-desc = 引用总数
17 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "Google Scholar Citation Count",
4 | "version": "4.3.0",
5 | "description": "Zotero plugin for fetching numbers of citations from Google Scholar.",
6 | "homepage_url": "https://github.com/justinribeiro/zotero-google-scholar-citation-count",
7 | "author": "Justin Ribeiro",
8 | "icons": {
9 | "48": "icons/favicon.png",
10 | "96": "icons/faviconX2.png"
11 | },
12 | "applications": {
13 | "zotero": {
14 | "id": "justin@justinribeiro.com",
15 | "update_url": "https://raw.githubusercontent.com/justinribeiro/zotero-google-scholar-citation-count/master/update.json",
16 | "strict_min_version": "6.999",
17 | "strict_max_version": "7.*.*"
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/locale/ja-JP/gscc.ftl:
--------------------------------------------------------------------------------
1 | gscc-menuitem =
2 | .label = Google Scholar の引用数を更新
3 | gscc-column-name = 引用数
4 | gscc-lastupdated-column-name = 引用数の最終更新日
5 | gscc-relevancescore-column-name = 引用数相対関連性スコア
6 | gscc-update-all =
7 | .label = すべての Google Scholar の引用数を更新。
8 | gscc-recapatcha-alert = 現在開くページでキャプチャを入力し、その後引用の更新を再試行してください。キャプチャが表示されていない場合は、Google によるブロック解除を待ってください。
9 | gscc-citedByPrefix = 引用元
10 | gscc-lackPermissions = このライブラリを編集する権限がありません。
11 | gscc-unSupportedEntryType = この種類のエントリの引用数更新はサポートされていません。
12 | gscc-unSupportedGroupCollection =
13 | .label = グループの更新はまだ実装されていません。
14 | gscc-invalidGoogleScholarURL = Google Scholar の URL が不正な形式のようです。"設定 > Google Scholar 引用数" で Google Scholar の URL を確認してください。
15 | gscc-progresswindow-title = 被引用数を更新しました
16 | gscc-progresswindow-desc = 総被引用数
17 |
18 |
--------------------------------------------------------------------------------
/__tests__/__data__/helpers.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Patch am Item record from Zotero with some of the methods we use to verify
3 | * behavior in tests
4 | * @param {object} data
5 | * @returns {ZoteroGenericItem}
6 | */
7 | function createItem(data) {
8 | const methods = {
9 | getField: function (field) {
10 | if (field === 'year') {
11 | // this is cheeky but fits the profile of the field
12 | return this.date.substring(this.date.length - 4);
13 | }
14 |
15 | return this[field];
16 | },
17 | getCreators: function () {
18 | return this.creators;
19 | },
20 | setField: function (field, info) {
21 | this[field] = info;
22 | },
23 | saveTx: function () {
24 | return;
25 | },
26 | };
27 | return { ...data, ...methods };
28 | }
29 |
30 | module.exports = { createItem };
31 |
--------------------------------------------------------------------------------
/src/bootstrap.js:
--------------------------------------------------------------------------------
1 | var $__gscc;
2 |
3 | function log(msg) {
4 | Zotero.debug('GSCC:' + msg);
5 | }
6 |
7 | function install() {
8 | log('Installed GSCC 4.0.0');
9 | }
10 |
11 | async function startup({ id, version, rootURI }) {
12 | log('Starting GSCC 4.0.0');
13 |
14 | const filePath = `${rootURI}/gscc.js`;
15 | Services.scriptloader.loadSubScript(filePath);
16 |
17 | Zotero.PreferencePanes.register({
18 | pluginID: 'justin@justinribeiro.com',
19 | src: `${rootURI}prefs.xhtml`,
20 | });
21 |
22 | $__gscc.app.init({ id, version, rootURI });
23 | $__gscc.app.addToAllWindows();
24 | await $__gscc.app.main();
25 | }
26 |
27 | function onMainWindowLoad({ window }) {
28 | $__gscc.app.addToWindow(window);
29 | }
30 |
31 | function onMainWindowUnload({ window }) {
32 | $__gscc.app.removeFromWindow(window);
33 | }
34 |
35 | function shutdown() {
36 | $__gscc.app.removeFromAllWindows();
37 | }
38 |
39 | function uninstall() {
40 | $__gscc.app.removeFromAllWindows();
41 | }
42 |
--------------------------------------------------------------------------------
/src/locale/en-US/gscc.ftl:
--------------------------------------------------------------------------------
1 | gscc-menuitem =
2 | .label = Update Google Scholar citation count
3 | gscc-column-name = Citation Count
4 | gscc-lastupdated-column-name = Citation Count Last Updated Date
5 | gscc-relevancescore-column-name = Citation Count Relative Relevance Score
6 | gscc-update-all =
7 | .label = Update All Google Scholar citation counts.
8 | gscc-recapatcha-alert = Please enter the Captcha on the page that will now open and then re-try updating the citations, or wait a while to get unblocked by Google if the Captcha is not present.
9 | gscc-citedByPrefix = Cited by
10 | gscc-lackPermissions = You lack the permission to make edit to this library.
11 | gscc-unSupportedEntryType = Updating citations for this type of entry is not supported.
12 | gscc-unSupportedGroupCollection =
13 | .label = Updating a Group is not yet implemented.
14 | gscc-invalidGoogleScholarURL = The Google Scholar URL appears malformed; please check "Settings > Google Scholar Citation Count" to verify your Google Scholar URL.
15 | gscc-progresswindow-title = Citation Count Updated
16 | gscc-progresswindow-desc = Citation Total
--------------------------------------------------------------------------------
/src/locale/es-ES/gscc.ftl:
--------------------------------------------------------------------------------
1 | gscc-menuitem =
2 | .label = Actualizar el recuento de citas de Google Scholar
3 | gscc-column-name = Recuento de citas
4 | gscc-lastupdated-column-name = Recuento de cotizaciones Fecha de última actualización
5 | gscc-relevancescore-column-name = Recuento de citas Puntuación de relevancia relativa
6 | gscc-update-all =
7 | .label = Actualizar todos los recuentos de citas de Google Scholar.
8 | gscc-recapatcha-alert = Por favor, introduzca el Captcha en la página que se abrirá ahora y luego intente actualizar las citas nuevamente, o espere un momento para que Google desbloquee si el Captcha no está presente.
9 | gscc-citedByPrefix = Citado por
10 | gscc-lackPermissions = No tiene permiso para editar esta biblioteca.
11 | gscc-unSupportedEntryType = No se admite la actualización de citas para este tipo de entrada.
12 | gscc-unSupportedGroupCollection =
13 | .label = La actualización de un grupo aún no está implementada.
14 | gscc-invalidGoogleScholarURL = La URL de Google Scholar parece estar mal formada; por favor, revise "Configuración > Recuento de citas de Google Scholar" para verificar su URL de Google Scholar.
15 | gscc-progresswindow-title = Recuento de citas actualizado
16 | gscc-progresswindow-desc = Total de citas
17 |
--------------------------------------------------------------------------------
/src/locale/fr-FR/gscc.ftl:
--------------------------------------------------------------------------------
1 | gscc-menuitem =
2 | .label = Mettre à jour le nombre de citations Google Scholar
3 | gscc-column-name = Nombre de citations
4 | gscc-lastupdated-column-name = Date de dernière mise à jour du nombre de citations
5 | gscc-relevancescore-column-name = Nombre de citations Score de pertinence relative
6 | gscc-update-all =
7 | .label = Mettre à jour tous les nombres de citations Google Scholar.
8 | gscc-recapatcha-alert = Veuillez entrer le Captcha sur la page qui va s'ouvrir, puis réessayez de mettre à jour les citations, ou attendez un moment pour être débloqué par Google si le Captcha n'est pas présent.
9 | gscc-citedByPrefix = Cité par
10 | gscc-lackPermissions = Vous n'avez pas la permission de modifier cette bibliothèque.
11 | gscc-unSupportedEntryType = La mise à jour des citations pour ce type d'entrée n'est pas prise en charge.
12 | gscc-unSupportedGroupCollection =
13 | .label = La mise à jour d'un groupe n'est pas encore implémentée.
14 | gscc-invalidGoogleScholarURL = L'URL de Google Scholar semble malformée ; veuillez vérifier "Paramètres > Nombre de citations Google Scholar" pour confirmer votre URL Google Scholar.
15 | gscc-progresswindow-title = Nombre de citations mis à jour
16 | gscc-progresswindow-desc = Nombre total de citations
17 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsList.js:
--------------------------------------------------------------------------------
1 | const getField = function (key) {
2 | return this[key];
3 | };
4 |
5 | const getCreators = function () {
6 | return this.creators;
7 | };
8 |
9 | const data = [
10 | {
11 | key: 'LHX8PRC3',
12 | version: 246,
13 | itemType: 'journalArticle',
14 | title:
15 | 'From transactional to transformational leadership: Learning to share the vision',
16 | date: 'December 1, 1990',
17 | language: 'en',
18 | shortTitle: 'From transactional to transformational leadership',
19 | libraryCatalog: 'ScienceDirect',
20 | url: 'https://www.sciencedirect.com/science/article/pii/009026169090061S',
21 | accessDate: '2021-09-22T20:55:33Z',
22 | extra: '',
23 | volume: '18',
24 | pages: '19-31',
25 | publicationTitle: 'Organizational Dynamics',
26 | DOI: '10.1016/0090-2616(90)90061-S',
27 | issue: '3',
28 | journalAbbreviation: 'Organizational Dynamics',
29 | ISSN: '0090-2616',
30 | creators: [
31 | {
32 | firstName: 'Bernard M.',
33 | lastName: 'Bass',
34 | creatorType: 'author',
35 | },
36 | ],
37 | tags: [],
38 | collections: ['I39PBJTI'],
39 | relations: {},
40 | dateAdded: '2021-09-22T20:55:33Z',
41 | dateModified: '2021-09-29T00:42:27Z',
42 | getField,
43 | getCreators,
44 | },
45 | ];
46 |
47 | module.exports = data;
48 |
--------------------------------------------------------------------------------
/__tests__/utils.test.js:
--------------------------------------------------------------------------------
1 | const base = require('../src/gscc.js');
2 | const hasCitation = require('./__data__/gsResponseHasCitation.js');
3 | const noCitation = require('./__data__/gsResponseNoCitation.js');
4 | const hasRecaptcha = require('./__data__/gsResponseHasRecaptcha');
5 |
6 | describe('Verify $__gscc.util', () => {
7 | it('check randomInteger() for proper output ', async () => {
8 | const test = base.$__gscc.util.randomInteger(1000, 2000);
9 | expect(test).toBeGreaterThan(1000);
10 | expect(test).toBeLessThan(2000);
11 | });
12 | it('check padCountWithZeros() length ', async () => {
13 | const test = base.$__gscc.util.padCountWithZeros('1234', 7);
14 | expect(test.length).toEqual(7);
15 | });
16 | it('hasCitationResults() should return true with result data in response ', async () => {
17 | const test = base.$__gscc.util.hasCitationResults(`${hasCitation.data}`);
18 | expect(test).toBe(true);
19 | });
20 | it('hasCitationResults() should return false with no result data in response ', async () => {
21 | const test = base.$__gscc.util.hasCitationResults(`${noCitation.data}`);
22 | expect(test).toBe(false);
23 | });
24 | it('hasRecaptcha() should return false with result data in response ', async () => {
25 | const test = base.$__gscc.util.hasRecaptcha(`${hasCitation.data}`);
26 | expect(test).toBe(false);
27 | });
28 | it('hasRecaptcha() should return true with recaptcha data in response ', async () => {
29 | const test = base.$__gscc.util.hasRecaptcha(`${hasRecaptcha.data}`);
30 | expect(test).toBe(true);
31 | });
32 | });
33 |
--------------------------------------------------------------------------------
/src/locale/zh-CH/gscc-prefs.ftl:
--------------------------------------------------------------------------------
1 | preferences-gscc-enable-random-wait-timing = 设置 Google 学术请求随机等待时间间隔
2 | preferences-gscc-random-wait-timing-explain = 为了尝试避免触发 Google 学术实施的 IP 阴影禁令,GSCC 对每个 HTTP 请求使用随机间隔。您可以通过修改下面的毫秒数来更改窗口。
3 | preferences-gscc-randomWaitMinMs = 最小请求等待时间(毫秒)
4 | preferences-gscc-randomWaitMaxMs = 最大请求等待时间(毫秒)
5 | preferences-gscc-search-params = 自定义搜索参数
6 | preferences-gscc-search-params-explain = 根据您导入的论文类型,有时找到匹配项会很困难。最新的 GSCC v4.1 允许通过标志改变搜索行为,以便在需要时提供帮助。在大多数情况下,您不需要使用以下标志,但如果遇到问题,不同全球区域的不同组合有时会有所帮助。
7 | preferences-gscc-useSearchTitleFuzzyMatch = 使用模糊标题匹配
8 | preferences-gscc-useSearchTitleFuzzyMatch-explain = 更改标题搜索行为,使其不那么严格。
9 | preferences-gscc-useSearchTitleFuzzyMatch-cb =
10 | .label = 使用模糊标题匹配(默认:false)
11 | preferences-gscc-useDateRangeMatch = 使用日期范围参数
12 | preferences-gscc-useDateRangeMatch-explain = 更改搜索行为,如果论文有相关年份,将添加一个模糊日期范围(+/- 2 年,根据测试,这是一个安全范围)。
13 | preferences-gscc-useDateRangeMatch-cb =
14 | .label = 使用日期范围搜索参数(默认:false)
15 | preferences-gscc-useSearchAuthorsMatch = 使用作者参数
16 | preferences-gscc-useSearchAuthorsMatch-explain = 更改搜索行为,将作者姓名添加到搜索参数中。
17 | preferences-gscc-useSearchAuthorsMatch-cb =
18 | .label = 使用作者搜索参数(默认:true)
19 | preferences-gscc-api-endpoint = Google 学术 API 端点
20 | preferences-gscc-api-endpoint-explain = 如果由于您所在地区的限制无法访问 Google 学术,请将其更改为代理或区域性 Google 学术域名。
21 | preferences-gscc-defaultGsApiEndpoint = Google 学术 API 端点(默认: https://scholar.google.com/)
22 | preferences-gscc-useAutoSearch = 添加时自动更新引用次数
23 | preferences-gscc-useAutoSearch-explain = 当项目添加到资料库时,自动搜索并更新引用次数。
24 | preferences-gscc-useAutoSearch-cb =
25 | .label = 项目添加到资料库时自动添加引用次数(默认值:false)
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 | .vscode
9 |
10 | # Diagnostic reports (https://nodejs.org/api/report.html)
11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12 |
13 | # Runtime data
14 | pids
15 | *.pid
16 | *.seed
17 | *.pid.lock
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 |
25 | # nyc test coverage
26 | .nyc_output
27 |
28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 | .grunt
30 |
31 | # Bower dependency directory (https://bower.io/)
32 | bower_components
33 |
34 | # node-waf configuration
35 | .lock-wscript
36 |
37 | # Compiled binary addons (https://nodejs.org/api/addons.html)
38 | build/Release
39 |
40 | # Dependency directories
41 | node_modules/
42 | jspm_packages/
43 |
44 | # TypeScript v1 declaration files
45 | typings/
46 |
47 | # Optional npm cache directory
48 | .npm
49 |
50 | # Optional eslint cache
51 | .eslintcache
52 |
53 | # Optional REPL history
54 | .node_repl_history
55 |
56 | # Output of 'npm pack'
57 | *.tgz
58 |
59 | # Yarn Integrity file
60 | .yarn-integrity
61 |
62 | # dotenv environment variables file
63 | .env
64 | .env.test
65 |
66 | # parcel-bundler cache (https://parceljs.org/)
67 | .cache
68 |
69 | # next.js build output
70 | .next
71 |
72 | # nuxt.js build output
73 | .nuxt
74 |
75 | # vuepress build output
76 | .vuepress/dist
77 |
78 | # Serverless directories
79 | .serverless/
80 |
81 | # FuseBox cache
82 | .fusebox/
83 |
84 | # DynamoDB Local files
85 | .dynamodb/
86 |
87 | # Custom Misc
88 | build/
89 | builds/
90 |
--------------------------------------------------------------------------------
/src/locale/ja-JP/gscc-prefs.ftl:
--------------------------------------------------------------------------------
1 | preferences-gscc-enable-random-wait-timing = Google Scholar リクエストのランダム待機間隔を設定
2 | preferences-gscc-random-wait-timing-explain = Google Scholar が実施する IP ブロックを回避するため、GSCC は各 HTTP リクエストにランダムな間隔を使用します。以下のミリ秒単位の設定を変更してウィンドウを調整できます。
3 | preferences-gscc-randomWaitMinMs = 最小リクエスト待機時間(ミリ秒)
4 | preferences-gscc-randomWaitMaxMs = 最大リクエスト待機時間(ミリ秒)
5 | preferences-gscc-search-params = カスタム検索パラメータ
6 | preferences-gscc-search-params-explain = インポートする論文の種類によっては、マッチを見つけるのが難しい場合があります。最新の GSCC v4.1 では、必要に応じてフラグを使用して検索動作を変更することができます。ほとんどの場合、以下のフラグは必要ありませんが、問題が発生した場合、異なる地域で異なる組み合わせが役立つことがあります。
7 | preferences-gscc-useSearchTitleFuzzyMatch = タイトルのファジーマッチを使用
8 | preferences-gscc-useSearchTitleFuzzyMatch-explain = タイトル検索の動作を変更し、厳格さを緩和します。
9 | preferences-gscc-useSearchTitleFuzzyMatch-cb =
10 | .label = タイトルのファジーマッチを使用(デフォルト:false)
11 | preferences-gscc-useDateRangeMatch = 日付範囲パラメータを使用
12 | preferences-gscc-useDateRangeMatch-explain = 論文に関連する年がある場合、検索動作を変更してファジーな日付範囲(+/- 2 年)を追加します。これはテストに基づいて安全な範囲です。
13 | preferences-gscc-useDateRangeMatch-cb =
14 | .label = 日付範囲検索パラメータを使用(デフォルト:false)
15 | preferences-gscc-useSearchAuthorsMatch = 著者パラメータを使用
16 | preferences-gscc-useSearchAuthorsMatch-explain = 検索パラメータに著者名を追加するように検索動作を変更します。
17 | preferences-gscc-useSearchAuthorsMatch-cb =
18 | .label = 著者検索パラメータを使用(デフォルト:true)
19 | preferences-gscc-api-endpoint = Google Scholar API エンドポイント
20 | preferences-gscc-api-endpoint-explain = 地域の制限により Google Scholar にアクセスできない場合は、これをプロキシまたは地域の Google Scholar ドメインに変更してください。
21 | preferences-gscc-defaultGsApiEndpoint = Google Scholar API エンドポイント(デフォルト: https://scholar.google.com/)
22 | preferences-gscc-useAutoSearch = 追加時に引用数を自動更新
23 | preferences-gscc-useAutoSearch-explain = アイテムがライブラリに追加されたときに、引用数を自動で検索・更新します。
24 | preferences-gscc-useAutoSearch-cb =
25 | .label = アイテム追加時に引用数を自動で追加する(デフォルト:false)
26 |
27 |
28 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsListSingleItemWithHtmlTitle.js:
--------------------------------------------------------------------------------
1 | const helpers = require('./helpers.js');
2 |
3 | const data = helpers.createItem({
4 | key: '7HLUVS5G',
5 | version: 14873,
6 | itemType: 'journalArticle',
7 | title:
8 | '(Y0.25Yb0.25Er0.25Lu0.25)2(Zr0.5Hf0.5)2O7: a defective fluorite structured high entropy ceramic with low thermal conductivity and close thermal expansion coefficient to Al2O3',
9 | creators: [
10 | { creatorType: 'author', firstName: 'Zifan', lastName: 'Zhao' },
11 | { creatorType: 'author', firstName: 'Heng', lastName: 'Chen' },
12 | { creatorType: 'author', firstName: 'Huimin', lastName: 'Xiang' },
13 | { creatorType: 'author', firstName: 'Fu-Zhi', lastName: 'Dai' },
14 | { creatorType: 'author', firstName: 'Xiaohui', lastName: 'Wang' },
15 | { creatorType: 'author', firstName: 'Wei', lastName: 'Xu' },
16 | { creatorType: 'author', firstName: 'Kuang', lastName: 'Sun' },
17 | { creatorType: 'author', firstName: 'Zhijian', lastName: 'Peng' },
18 | { creatorType: 'author', firstName: 'Yanchun', lastName: 'Zhou' },
19 | ],
20 | abstractNote: '',
21 | publicationTitle: 'Journal of Materials Science & Technology',
22 | volume: '39',
23 | issue: '',
24 | pages: '167-172',
25 | date: '02/2020',
26 | series: '',
27 | seriesTitle: '',
28 | seriesText: '',
29 | journalAbbreviation: 'Journal of Materials Science & Technology',
30 | language: 'en',
31 | DOI: '10.1016/j.jmst.2019.08.018',
32 | ISSN: '10050302',
33 | shortTitle: '(Y0.25Yb0.25Er0.25Lu0.25)2(Zr0.5Hf0.5)2O7',
34 | url: 'https://linkinghub.elsevier.com/retrieve/pii/S1005030219303329',
35 | accessDate: '2024-11-21T17:07:44Z',
36 | archive: '',
37 | archiveLocation: '',
38 | libraryCatalog: 'DOI.org (Crossref)',
39 | callNumber: '',
40 | rights: '',
41 | extra: 'GSCC: 0000071',
42 | tags: [],
43 | collections: ['27YH8FR3'],
44 | relations: {},
45 | dateAdded: '2024-11-21T17:07:44Z',
46 | dateModified: '2024-12-11T17:57:43Z',
47 | });
48 |
49 | module.exports = { data };
50 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "zotero-google-scholar-citation-count",
3 | "version": "4.3.0",
4 | "bugs": {
5 | "url": "https://github.com/justinribeiro/zotero-google-scholar-citation-count/issues"
6 | },
7 | "license": "MPLv2",
8 | "repository": {
9 | "type": "git",
10 | "url": "git@github.com:justinribeiro/zotero-google-scholar-citation-count.git"
11 | },
12 | "contributors": [
13 | {
14 | "name": "Justin Ribeiro",
15 | "email": "justin@justinribeiro.com",
16 | "url": "https://justinribeiro.com"
17 | },
18 | {
19 | "name": "Anton Beloglazov",
20 | "url": "https://beloglazov.info/"
21 | },
22 | {
23 | "name": "MaxKuehn",
24 | "url": "https://github.com/MaxKuehn"
25 | },
26 | {
27 | "name": "tete1030",
28 | "url": "https://github.com/tete1030"
29 | },
30 | {
31 | "name": "Nico",
32 | "url": "https://github.com/nico-zck"
33 | },
34 | {
35 | "name": "bitnikrbt",
36 | "url": "https://github.com/bitnikrbt"
37 | },
38 | {
39 | "name": "drevicko",
40 | "url": "https://github.com/drevicko"
41 | }
42 | ],
43 | "scripts": {
44 | "package": "npm run clean && bash -c ./build.sh",
45 | "clean": "rm -rf coverage build",
46 | "test": "jest",
47 | "make-badges": "istanbul-badges-readme"
48 | },
49 | "devDependencies": {
50 | "@types/jest": "^29.5.14",
51 | "assert": ">=2.1.0",
52 | "core-js": "^3.39.0",
53 | "eslint": "^9.14.0",
54 | "eslint-config-prettier": "^9.1.0",
55 | "eslint-plugin-jest": "^28.8.3",
56 | "istanbul-badges-readme": "^1.9.0",
57 | "jest": "^29.7.0",
58 | "jest-environment-jsdom": "^29.7.0",
59 | "mocha": "^10.8.2",
60 | "nyc": "^17.1.0",
61 | "prettier": "3.3.3",
62 | "vitest": "^2.1.4"
63 | },
64 | "prettier": {
65 | "singleQuote": true
66 | },
67 | "eslintConfig": {
68 | "extends": [
69 | "eslint:recommended",
70 | "prettier"
71 | ],
72 | "plugins": [
73 | "jest"
74 | ],
75 | "parserOptions": {
76 | "ecmaVersion": 2020,
77 | "sourceType": "module"
78 | },
79 | "env": {
80 | "browser": true,
81 | "node": true,
82 | "jest/globals": true,
83 | "es6": true
84 | },
85 | "globals": {
86 | "$__gscc": false,
87 | "Components": false,
88 | "Zotero": false,
89 | "ZoteroPane": false,
90 | "ZoteroStandalone": false,
91 | "Services": false
92 | }
93 | },
94 | "private": true
95 | }
--------------------------------------------------------------------------------
/src/locale/en-US/gscc-prefs.ftl:
--------------------------------------------------------------------------------
1 | preferences-gscc-enable-random-wait-timing = Set Google Scholar Request Random Wait Intervals
2 | preferences-gscc-random-wait-timing-explain = To attempt to not trigger the IP shadow ban that Google Scholar implements, GSCC uses a random interval per HTTP request. You can change the window by revising the milliseconds below.
3 | preferences-gscc-randomWaitMinMs = Minimum Request Wait (milliseconds)
4 | preferences-gscc-randomWaitMaxMs = Maximum Request Wait (milliseconds)
5 | preferences-gscc-search-params = Custom Search Parameters
6 | preferences-gscc-search-params-explain = Depending on the types of papers you import, sometimes finding matches can be hard. The latest v4.1 of GSCC allows changing the search behavior through flags to help when you need it. In most cases, you shouldn't need the flags below, but if you're having issues, different combinations in different global regions can sometimes help.
7 | preferences-gscc-useSearchTitleFuzzyMatch= Use Fuzzy Title Match
8 | preferences-gscc-useSearchTitleFuzzyMatch-explain = Changes the title search behavior to be less strict.
9 | preferences-gscc-useSearchTitleFuzzyMatch-cb =
10 | .label = Use Fuzzy Title Match (default: false)
11 | preferences-gscc-useDateRangeMatch = Use Date Range Param
12 | preferences-gscc-useDateRangeMatch-explain = Changes the search behavior to add a fuzzy date range if the paper has a year associated (+/- 2 years, which is a safe spot based on testing).
13 | preferences-gscc-useDateRangeMatch-cb =
14 | .label = Use Date Range Search Param (default: false)
15 | preferences-gscc-useSearchAuthorsMatch = Use Authors Param
16 | preferences-gscc-useSearchAuthorsMatch-explain = Changes the search behavior to add authors names to the search params.
17 | preferences-gscc-useSearchAuthorsMatch-cb =
18 | .label = Use Authors Search Param (default: true)
19 | preferences-gscc-api-endpoint = Google Scholar API Endpoint
20 | preferences-gscc-api-endpoint-explain = If you cannot access Google Scholar due to restrictions in your locale, change this to a proxy or regional Google Scholar domain.
21 | preferences-gscc-defaultGsApiEndpoint = Google Scholar API Endpoint (default: https://scholar.google.com/)
22 | preferences-gscc-useAutoSearch = Automatically Update Citation Count on Add
23 | preferences-gscc-useAutoSearch-explain = Automatically search and update the citation count when an item is added to the library.
24 | preferences-gscc-useAutoSearch-cb =
25 | .label = Add Citation Count Automatically when Item added to Library (default: false)
26 |
27 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsListSingleItemWithNoCreators.js:
--------------------------------------------------------------------------------
1 | const helpers = require('./helpers.js');
2 |
3 | const data = helpers.createItem({
4 | key: '3ZBCBKUH',
5 | version: 246,
6 | itemType: 'journalArticle',
7 | title:
8 | 'Potential Biases in Leadership Measures: How Prototypes, Leniency, and General Satisfaction Relate to Ratings and Rankings of Transformational and Transactional Leadership Constructs',
9 | abstractNote:
10 | "Eighty-seven respondents completed either a graphic rating or a forced ranking questionnaire describing their immediate superior. Five leadership scales were embedded in each questionnaire. Three represented transformational leadership constructs (charismatic leadership, individualized consideration, and intellectual stimulation); two reflected transactional leadership constructs (contingent reward and management-by-exception). Appended to each questionnaire were five additional scales. The items constituting these scales measured two outcomes-satisfaction with the leader and effectiveness of the leader. The remaining scales measured each participant's leadership prototype, the participant's tendency to be lenient in his/her ratings, and a general measure of satisfaction. As expected, the intercorrelations among the factor scores representing the transformational and transactional leadership constructs were reduced substantially by using the forced rankings as compared with the graphic ratings. Also, the magnitude of the relationships among leadership and outcome factor scores was reduced, on average, when using the forced rankings. Prototypicality factor scores were more highly correlated with factor scores reflecting transformational than were factor scores portraying transactional leadership. The tendency of participants to be more or less lenient in their ratings or rankings and their general level of satisfaction were of little or no consequence to the intercorrelations among the leadership and outcome factor scales.",
11 | date: 'September 1, 1989',
12 | url: 'https://doi.org/10.1177/001316448904900302',
13 | accessDate: '2021-09-22',
14 | extra: '',
15 | volume: '49',
16 | pages: '509-527',
17 | publicationTitle: 'Educational and Psychological Measurement',
18 | DOI: '10.1177/001316448904900302',
19 | issue: '3',
20 | journalAbbreviation: 'Educational and Psychological Measurement',
21 | ISSN: '0013-1644',
22 | creators: [],
23 | tags: [],
24 | collections: ['I39PBJTI'],
25 | relations: {},
26 | dateAdded: '2021-09-22T20:25:22Z',
27 | dateModified: '2021-09-29T00:41:26Z',
28 | });
29 |
30 | module.exports = { data };
31 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsListSingleItemWithNoTitle.js:
--------------------------------------------------------------------------------
1 | const helpers = require('./helpers.js');
2 |
3 | const data = helpers.createItem({
4 | key: '3ZBCBKUH',
5 | version: 246,
6 | itemType: 'journalArticle',
7 | title: '',
8 | abstractNote:
9 | "Eighty-seven respondents completed either a graphic rating or a forced ranking questionnaire describing their immediate superior. Five leadership scales were embedded in each questionnaire. Three represented transformational leadership constructs (charismatic leadership, individualized consideration, and intellectual stimulation); two reflected transactional leadership constructs (contingent reward and management-by-exception). Appended to each questionnaire were five additional scales. The items constituting these scales measured two outcomes-satisfaction with the leader and effectiveness of the leader. The remaining scales measured each participant's leadership prototype, the participant's tendency to be lenient in his/her ratings, and a general measure of satisfaction. As expected, the intercorrelations among the factor scores representing the transformational and transactional leadership constructs were reduced substantially by using the forced rankings as compared with the graphic ratings. Also, the magnitude of the relationships among leadership and outcome factor scores was reduced, on average, when using the forced rankings. Prototypicality factor scores were more highly correlated with factor scores reflecting transformational than were factor scores portraying transactional leadership. The tendency of participants to be more or less lenient in their ratings or rankings and their general level of satisfaction were of little or no consequence to the intercorrelations among the leadership and outcome factor scales.",
10 | date: 'September 1, 1989',
11 | url: 'https://doi.org/10.1177/001316448904900302',
12 | accessDate: '2021-09-22',
13 | extra: '',
14 | volume: '49',
15 | pages: '509-527',
16 | publicationTitle: 'Educational and Psychological Measurement',
17 | DOI: '10.1177/001316448904900302',
18 | issue: '3',
19 | journalAbbreviation: 'Educational and Psychological Measurement',
20 | ISSN: '0013-1644',
21 | creators: [
22 | {
23 | firstName: 'Bernard M.',
24 | lastName: 'Bass',
25 | creatorType: 'author',
26 | },
27 | {
28 | firstName: 'Bruce J.',
29 | lastName: 'Avolio',
30 | creatorType: 'author',
31 | },
32 | ],
33 | tags: [],
34 | collections: ['I39PBJTI'],
35 | relations: {},
36 | dateAdded: '2021-09-22T20:25:22Z',
37 | dateModified: '2021-09-29T00:41:26Z',
38 | });
39 |
40 | module.exports = { data };
41 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsListSingleItemWithNoCount.js:
--------------------------------------------------------------------------------
1 | const helpers = require('./helpers.js');
2 |
3 | const data = helpers.createItem({
4 | key: '3ZBCBKUH',
5 | version: 246,
6 | itemType: 'journalArticle',
7 | title:
8 | 'Potential Biases in Leadership Measures: How Prototypes, Leniency, and General Satisfaction Relate to Ratings and Rankings of Transformational and Transactional Leadership Constructs',
9 | abstractNote:
10 | "Eighty-seven respondents completed either a graphic rating or a forced ranking questionnaire describing their immediate superior. Five leadership scales were embedded in each questionnaire. Three represented transformational leadership constructs (charismatic leadership, individualized consideration, and intellectual stimulation); two reflected transactional leadership constructs (contingent reward and management-by-exception). Appended to each questionnaire were five additional scales. The items constituting these scales measured two outcomes-satisfaction with the leader and effectiveness of the leader. The remaining scales measured each participant's leadership prototype, the participant's tendency to be lenient in his/her ratings, and a general measure of satisfaction. As expected, the intercorrelations among the factor scores representing the transformational and transactional leadership constructs were reduced substantially by using the forced rankings as compared with the graphic ratings. Also, the magnitude of the relationships among leadership and outcome factor scores was reduced, on average, when using the forced rankings. Prototypicality factor scores were more highly correlated with factor scores reflecting transformational than were factor scores portraying transactional leadership. The tendency of participants to be more or less lenient in their ratings or rankings and their general level of satisfaction were of little or no consequence to the intercorrelations among the leadership and outcome factor scales.",
11 | date: 'September 1, 1989',
12 | url: 'https://doi.org/10.1177/001316448904900302',
13 | accessDate: '2021-09-22',
14 | extra: '',
15 | volume: '49',
16 | pages: '509-527',
17 | publicationTitle: 'Educational and Psychological Measurement',
18 | DOI: '10.1177/001316448904900302',
19 | issue: '3',
20 | journalAbbreviation: 'Educational and Psychological Measurement',
21 | ISSN: '0013-1644',
22 | creators: [
23 | {
24 | firstName: 'Bernard M.',
25 | lastName: 'Bass',
26 | creatorType: 'author',
27 | },
28 | {
29 | firstName: 'Bruce J.',
30 | lastName: 'Avolio',
31 | creatorType: 'author',
32 | },
33 | ],
34 | tags: [],
35 | collections: ['I39PBJTI'],
36 | relations: {},
37 | dateAdded: '2021-09-22T20:25:22Z',
38 | dateModified: '2021-09-29T00:41:26Z',
39 | });
40 |
41 | module.exports = { data };
42 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsListSingleItemWithCountLegacyFormat.js:
--------------------------------------------------------------------------------
1 | const helpers = require('./helpers.js');
2 |
3 | const data = helpers.createItem({
4 | key: '3ZBCBKUH',
5 | version: 246,
6 | itemType: 'journalArticle',
7 | title:
8 | 'Potential Biases in Leadership Measures: How Prototypes, Leniency, and General Satisfaction Relate to Ratings and Rankings of Transformational and Transactional Leadership Constructs',
9 | abstractNote:
10 | "Eighty-seven respondents completed either a graphic rating or a forced ranking questionnaire describing their immediate superior. Five leadership scales were embedded in each questionnaire. Three represented transformational leadership constructs (charismatic leadership, individualized consideration, and intellectual stimulation); two reflected transactional leadership constructs (contingent reward and management-by-exception). Appended to each questionnaire were five additional scales. The items constituting these scales measured two outcomes-satisfaction with the leader and effectiveness of the leader. The remaining scales measured each participant's leadership prototype, the participant's tendency to be lenient in his/her ratings, and a general measure of satisfaction. As expected, the intercorrelations among the factor scores representing the transformational and transactional leadership constructs were reduced substantially by using the forced rankings as compared with the graphic ratings. Also, the magnitude of the relationships among leadership and outcome factor scores was reduced, on average, when using the forced rankings. Prototypicality factor scores were more highly correlated with factor scores reflecting transformational than were factor scores portraying transactional leadership. The tendency of participants to be more or less lenient in their ratings or rankings and their general level of satisfaction were of little or no consequence to the intercorrelations among the leadership and outcome factor scales.",
11 | date: 'September 1, 1989',
12 | url: 'https://doi.org/10.1177/001316448904900302',
13 | accessDate: '2021-09-22',
14 | extra: 'GSCC: 0000505 \nPublisher: SAGE Publications Inc',
15 | volume: '49',
16 | pages: '509-527',
17 | publicationTitle: 'Educational and Psychological Measurement',
18 | DOI: '10.1177/001316448904900302',
19 | issue: '3',
20 | journalAbbreviation: 'Educational and Psychological Measurement',
21 | ISSN: '0013-1644',
22 | creators: [
23 | {
24 | firstName: 'Bernard M.',
25 | lastName: 'Bass',
26 | creatorType: 'author',
27 | },
28 | {
29 | firstName: 'Bruce J.',
30 | lastName: 'Avolio',
31 | creatorType: 'author',
32 | },
33 | ],
34 | tags: [],
35 | collections: ['I39PBJTI'],
36 | relations: {},
37 | dateAdded: '2021-09-22T20:25:22Z',
38 | dateModified: '2021-09-29T00:41:26Z',
39 | });
40 |
41 | module.exports = { data };
42 |
--------------------------------------------------------------------------------
/__tests__/__data__/zoteroItemsListSingleItemWithCount.js:
--------------------------------------------------------------------------------
1 | const helpers = require('./helpers.js');
2 |
3 | const data = helpers.createItem({
4 | key: '3ZBCBKUH',
5 | version: 246,
6 | itemType: 'journalArticle',
7 | title:
8 | 'Potential Biases in Leadership Measures: How Prototypes, Leniency, and General Satisfaction Relate to Ratings and Rankings of Transformational and Transactional Leadership Constructs',
9 | abstractNote:
10 | "Eighty-seven respondents completed either a graphic rating or a forced ranking questionnaire describing their immediate superior. Five leadership scales were embedded in each questionnaire. Three represented transformational leadership constructs (charismatic leadership, individualized consideration, and intellectual stimulation); two reflected transactional leadership constructs (contingent reward and management-by-exception). Appended to each questionnaire were five additional scales. The items constituting these scales measured two outcomes-satisfaction with the leader and effectiveness of the leader. The remaining scales measured each participant's leadership prototype, the participant's tendency to be lenient in his/her ratings, and a general measure of satisfaction. As expected, the intercorrelations among the factor scores representing the transformational and transactional leadership constructs were reduced substantially by using the forced rankings as compared with the graphic ratings. Also, the magnitude of the relationships among leadership and outcome factor scores was reduced, on average, when using the forced rankings. Prototypicality factor scores were more highly correlated with factor scores reflecting transformational than were factor scores portraying transactional leadership. The tendency of participants to be more or less lenient in their ratings or rankings and their general level of satisfaction were of little or no consequence to the intercorrelations among the leadership and outcome factor scales.",
11 | date: 'September 1, 1989',
12 | url: 'https://doi.org/10.1177/001316448904900302',
13 | accessDate: '2021-09-22',
14 | extra:
15 | 'GSCC: 0000505 2025-01-01T08:00:00.000Z 0.54 \nPublisher: SAGE Publications Inc',
16 | volume: '49',
17 | pages: '509-527',
18 | publicationTitle: 'Educational and Psychological Measurement',
19 | DOI: '10.1177/001316448904900302',
20 | issue: '3',
21 | journalAbbreviation: 'Educational and Psychological Measurement',
22 | ISSN: '0013-1644',
23 | creators: [
24 | {
25 | firstName: 'Bernard M.',
26 | lastName: 'Bass',
27 | creatorType: 'author',
28 | },
29 | {
30 | firstName: 'Bruce J.',
31 | lastName: 'Avolio',
32 | creatorType: 'author',
33 | },
34 | ],
35 | tags: [],
36 | collections: ['I39PBJTI'],
37 | relations: {},
38 | dateAdded: '2021-09-22T20:25:22Z',
39 | dateModified: '2021-09-29T00:41:26Z',
40 | });
41 |
42 | module.exports = { data };
43 |
--------------------------------------------------------------------------------
/src/locale/es-ES/gscc-prefs.ftl:
--------------------------------------------------------------------------------
1 | preferences-gscc-enable-random-wait-timing = Establecer intervalos de espera aleatorios para las solicitudes de Google Scholar
2 | preferences-gscc-random-wait-timing-explain = Para intentar no activar la prohibición de IP que implementa Google Scholar, GSCC utiliza un intervalo aleatorio por cada solicitud HTTP. Puede cambiar la ventana modificando los milisegundos a continuación.
3 | preferences-gscc-randomWaitMinMs = Espera mínima de solicitud (milisegundos)
4 | preferences-gscc-randomWaitMaxMs = Espera máxima de solicitud (milisegundos)
5 | preferences-gscc-search-params = Parámetros de búsqueda personalizados
6 | preferences-gscc-search-params-explain = Dependiendo de los tipos de documentos que importe, a veces puede ser difícil encontrar coincidencias. La última versión v4.1 de GSCC permite cambiar el comportamiento de búsqueda mediante opciones para ayudarle cuando lo necesite. En la mayoría de los casos, no necesitará las opciones a continuación, pero si tiene problemas, diferentes combinaciones en distintas regiones globales pueden ayudar.
7 | preferences-gscc-useSearchTitleFuzzyMatch = Usar coincidencia de título difusa
8 | preferences-gscc-useSearchTitleFuzzyMatch-explain = Cambia el comportamiento de la búsqueda de títulos para que sea menos estricta.
9 | preferences-gscc-useSearchTitleFuzzyMatch-cb =
10 | .label = Usar coincidencia de título difusa (por defecto: false)
11 | preferences-gscc-useDateRangeMatch = Usar parámetro de rango de fechas
12 | preferences-gscc-useDateRangeMatch-explain = Cambia el comportamiento de búsqueda para agregar un rango de fechas difuso si el documento tiene un año asociado (+/- 2 años, que es un margen seguro basado en pruebas).
13 | preferences-gscc-useDateRangeMatch-cb =
14 | .label = Usar parámetro de búsqueda por rango de fechas (por defecto: false)
15 | preferences-gscc-useSearchAuthorsMatch = Usar parámetro de autores
16 | preferences-gscc-useSearchAuthorsMatch-explain = Cambia el comportamiento de búsqueda para agregar los nombres de los autores a los parámetros de búsqueda.
17 | preferences-gscc-useSearchAuthorsMatch-cb =
18 | .label = Usar parámetro de búsqueda por autores (por defecto: true)
19 | preferences-gscc-api-endpoint = Punto de acceso API de Google Scholar
20 | preferences-gscc-api-endpoint-explain = Si no puede acceder a Google Scholar debido a restricciones en su región, cambie esto a un proxy o un dominio regional de Google Scholar.
21 | preferences-gscc-defaultGsApiEndpoint = Punto de acceso API de Google Scholar (predeterminado: https://scholar.google.com/)
22 | preferences-gscc-useAutoSearch = Actualizar automáticamente el recuento de citas al añadir
23 | preferences-gscc-useAutoSearch-explain = Buscar y actualizar automáticamente el recuento de citas cuando se añade un elemento a la biblioteca.
24 | preferences-gscc-useAutoSearch-cb =
25 | .label = Añadir recuento de citas automáticamente al añadir un elemento a la biblioteca (por defecto: falso)
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * For a detailed explanation regarding each configuration property, visit:
3 | * https://jestjs.io/docs/configuration
4 | */
5 |
6 | export default {
7 | collectCoverage: true,
8 |
9 | // An array of glob patterns indicating a set of files for which coverage information should be collected
10 | // collectCoverageFrom: undefined,
11 |
12 | // The directory where Jest should output its coverage files
13 | coverageDirectory: 'coverage',
14 |
15 | // An array of regexp pattern strings used to skip coverage collection
16 | coveragePathIgnorePatterns: ['/node_modules/', '__data__'],
17 |
18 | // Indicates which provider should be used to instrument code for coverage
19 | // coverageProvider: "babel",
20 |
21 | // A list of reporter names that Jest uses when writing coverage reports
22 | coverageReporters: ['json-summary', 'text', 'lcov', 'html'],
23 |
24 | coverageThreshold: {
25 | global: {
26 | branches: 80,
27 | functions: 85,
28 | lines: 85,
29 | statements: 85,
30 | },
31 | },
32 |
33 | setupFiles: ['core-js', './__tests__/__setup__/setupJest.js'],
34 |
35 | testEnvironment: './__tests__/__setup__/env.js',
36 |
37 | testMatch: ['**/__tests__/**/*?(*.)+(spec|test).[tj]s?(x)'],
38 |
39 | // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
40 | // testPathIgnorePatterns: [
41 | // "/node_modules/"
42 | // ],
43 |
44 | // The regexp pattern or array of patterns that Jest uses to detect test files
45 | // testRegex: [],
46 |
47 | // This option allows the use of a custom results processor
48 | // testResultsProcessor: undefined,
49 |
50 | // This option allows use of a custom test runner
51 | // testRunner: "jest-circus/runner",
52 |
53 | // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
54 | // testURL: "http://localhost",
55 |
56 | // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
57 | // timers: "real",
58 |
59 | // A map from regular expressions to paths to transformers
60 | // transform: undefined,
61 |
62 | // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
63 | // transformIgnorePatterns: [
64 | // "/node_modules/",
65 | // "\\.pnp\\.[^\\/]+$"
66 | // ],
67 |
68 | // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
69 | // unmockedModulePathPatterns: undefined,
70 |
71 | // Indicates whether each individual test should be reported during the run
72 | verbose: false,
73 |
74 | // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
75 | // watchPathIgnorePatterns: [],
76 |
77 | // Whether to use watchman for file crawling
78 | // watchman: true,
79 | };
80 |
--------------------------------------------------------------------------------
/__tests__/__data__/extraFieldExtractorData.js:
--------------------------------------------------------------------------------
1 | const data = [
2 | {
3 | string: 'GSCC:00001001',
4 | expectedResult: {
5 | citationCount: 1001,
6 | lastUpdated: '',
7 | relevanceScore: 0,
8 | },
9 | },
10 | {
11 | string: 'GSCC: 00001000',
12 | expectedResult: {
13 | citationCount: 1000,
14 | lastUpdated: '',
15 | relevanceScore: 0,
16 | },
17 | },
18 |
19 | {
20 | string: 'badstartdata GSCC: 00001001',
21 | expectedResult: {
22 | citationCount: 0,
23 | lastUpdated: '',
24 | relevanceScore: 0,
25 | },
26 | },
27 | {
28 | string: 'GSCC: 0000010 2025-01-01T08:00:00.000Z \n',
29 | expectedResult: {
30 | citationCount: 10,
31 | lastUpdated: '1/1/2025, 12:00:00 AM',
32 | relevanceScore: 0,
33 | },
34 | },
35 | {
36 | string:
37 | 'GSCC: 0000400 2025-01-01T08:00:00.000Z \nPublisher: SAGE Publications Inc',
38 | expectedResult: {
39 | citationCount: 400,
40 | lastUpdated: '1/1/2025, 12:00:00 AM',
41 | relevanceScore: 0,
42 | },
43 | },
44 | {
45 | string:
46 | 'some custom data on top\nGSCC: 0000401 2025-01-01T08:00:00.000Z \nPublisher: SAGE Publications Inc',
47 | expectedResult: {
48 | citationCount: 401,
49 | lastUpdated: '1/1/2025, 12:00:00 AM',
50 | relevanceScore: 0,
51 | },
52 | },
53 | {
54 | string:
55 | 'some custom data on top\nGSCC: 0000401 2025-01-01T08:00:00.000Z 2.2\nPublisher: SAGE Publications Inc',
56 | expectedResult: {
57 | citationCount: 401,
58 | lastUpdated: '1/1/2025, 12:00:00 AM',
59 | relevanceScore: 2.2,
60 | },
61 | },
62 | {
63 | string:
64 | 'GSCC: 0010401 2025-01-01T08:00:00.000Z 2.4\nPublisher: SAGE Publications Inc',
65 | expectedResult: {
66 | citationCount: 10401,
67 | lastUpdated: '1/1/2025, 12:00:00 AM',
68 | relevanceScore: 2.4,
69 | },
70 | },
71 | {
72 | string:
73 | 'GSCC: 0010433 2025-01-01T08:00:00.000Z 2.5 \n',
74 | expectedResult: {
75 | citationCount: 10433,
76 | lastUpdated: '1/1/2025, 12:00:00 AM',
77 | relevanceScore: 2.5,
78 | },
79 | },
80 | {
81 | string:
82 | 'GSCC: 0000433 2025-01-01T08:00:00.000Z 1.5',
83 | expectedResult: {
84 | citationCount: 433,
85 | lastUpdated: '1/1/2025, 12:00:00 AM',
86 | relevanceScore: 1.5,
87 | },
88 | },
89 | {
90 | string:
91 | 'GSCC:0000433 2025-01-01T08:00:00.000Z 1.5 ',
92 | expectedResult: {
93 | citationCount: 433,
94 | lastUpdated: '1/1/2025, 12:00:00 AM',
95 | relevanceScore: 1.5,
96 | },
97 | },
98 | {
99 | string:
100 | 'GSCC:0000433 2025-01-01T08:00:00.000Z ',
101 | expectedResult: {
102 | citationCount: 433,
103 | lastUpdated: '1/1/2025, 12:00:00 AM',
104 | relevanceScore: 0,
105 | },
106 | },
107 | ];
108 |
109 | module.exports = data;
110 |
--------------------------------------------------------------------------------
/src/locale/fr-FR/gscc-prefs.ftl:
--------------------------------------------------------------------------------
1 | preferences-gscc-enable-random-wait-timing = Définir des intervalles d'attente aléatoires pour les requêtes Google Scholar
2 | preferences-gscc-random-wait-timing-explain = Pour tenter de ne pas déclencher l'interdiction IP imposée par Google Scholar, GSCC utilise un intervalle aléatoire pour chaque requête HTTP. Vous pouvez modifier la fenêtre en révisant les millisecondes ci-dessous.
3 | preferences-gscc-randomWaitMinMs = Temps d'attente minimum (millisecondes)
4 | preferences-gscc-randomWaitMaxMs = Temps d'attente maximum (millisecondes)
5 | preferences-gscc-search-params = Paramètres de recherche personnalisés
6 | preferences-gscc-search-params-explain = En fonction des types de documents que vous importez, il peut parfois être difficile de trouver des correspondances. La dernière version v4.1 de GSCC permet de modifier le comportement de recherche via des options pour vous aider en cas de besoin. Dans la plupart des cas, vous n'aurez pas besoin de ces options, mais si vous rencontrez des problèmes, différentes combinaisons dans différentes régions peuvent parfois aider.
7 | preferences-gscc-useSearchTitleFuzzyMatch = Utiliser la correspondance floue des titres
8 | preferences-gscc-useSearchTitleFuzzyMatch-explain = Modifie le comportement de recherche des titres pour le rendre moins strict.
9 | preferences-gscc-useSearchTitleFuzzyMatch-cb =
10 | .label = Utiliser la correspondance floue des titres (par défaut : false)
11 | preferences-gscc-useDateRangeMatch = Utiliser le paramètre de plage de dates
12 | preferences-gscc-useDateRangeMatch-explain = Modifie le comportement de recherche pour ajouter une plage de dates floue si le document comporte une année associée (+/- 2 ans, basé sur des tests, c'est une plage sûre).
13 | preferences-gscc-useDateRangeMatch-cb =
14 | .label = Utiliser le paramètre de recherche par plage de dates (par défaut : false)
15 | preferences-gscc-useSearchAuthorsMatch = Utiliser le paramètre des auteurs
16 | preferences-gscc-useSearchAuthorsMatch-explain = Modifie le comportement de recherche pour ajouter les noms des auteurs aux paramètres de recherche.
17 | preferences-gscc-useSearchAuthorsMatch-cb =
18 | .label = Utiliser le paramètre de recherche par auteurs (par défaut : true)
19 | preferences-gscc-api-endpoint = Point de terminaison API de Google Scholar
20 | preferences-gscc-api-endpoint-explain = Si vous ne pouvez pas accéder à Google Scholar en raison de restrictions dans votre région, modifiez ceci pour utiliser un proxy ou un domaine régional de Google Scholar.
21 | preferences-gscc-defaultGsApiEndpoint = Point de terminaison API de Google Scholar (par défaut : https://scholar.google.com/)
22 | preferences-gscc-useAutoSearch = Mettre à jour automatiquement le nombre de citations à l’ajout
23 | preferences-gscc-useAutoSearch-explain = Rechercher et mettre à jour automatiquement le nombre de citations lorsqu’un élément est ajouté à la bibliothèque.
24 | preferences-gscc-useAutoSearch-cb =
25 | .label = Ajouter automatiquement le nombre de citations lors de l’ajout à la bibliothèque (par défaut : faux)
26 |
--------------------------------------------------------------------------------
/__tests__/__setup__/setupJest.js:
--------------------------------------------------------------------------------
1 | jest.setTimeout(60000);
2 |
3 | global.Zotero = {
4 | Debug: {
5 | // eslint-disable-next-line no-unused-vars
6 | log: (message, level, maxDepth, stack) => {
7 | return message;
8 | },
9 | },
10 | openInViewer: (targetUrl) => {
11 | if (!targetUrl) {
12 | throw new Error('missing params');
13 | }
14 | Zotero.viewerOpen = true;
15 | return;
16 | },
17 | launchURL: (targetUrl) => {
18 | if (!targetUrl) {
19 | throw new Error('missing params');
20 | }
21 | Zotero.viewerOpen = true;
22 | return;
23 | },
24 | ScholarCitations: () => {
25 | return {};
26 | },
27 | getMainWindow: () => {
28 | return global.window;
29 | },
30 | viewerOpen: false,
31 | Prefs: {
32 | get: (a, b) => {
33 | return b;
34 | },
35 | },
36 | ItemTreeManager: {
37 | registerColumns: () => {},
38 | unregisterColumns: () => {},
39 | },
40 | ProgressWindow: jest.fn().mockImplementation(() => ({
41 | changeHeadline: jest.fn(),
42 | addDescription: jest.fn(),
43 | show: jest.fn(),
44 | startCloseTimer: jest.fn(),
45 | })),
46 | Notifier: {
47 | registerObserver: jest.fn(),
48 | },
49 | };
50 |
51 | global.document.l10n = {
52 | formatValue: (a) => {
53 | return a;
54 | },
55 | };
56 |
57 | global.window.MozXULElement = {
58 | insertFTLIfNeeded: () => {},
59 | };
60 |
61 | // cheeky, but we're not testing Google Scholar here
62 | global.XMLHttpRequest = jest.fn().mockImplementation(() => {
63 | return {
64 | readyState: 4,
65 | status: 200,
66 | responseText: JSON.stringify({ message: 'Justin mocking response' }),
67 | open: jest.fn(),
68 | send: jest.fn().mockImplementation(function () {
69 | this.onreadystatechange();
70 | }),
71 | setRequestHeader: jest.fn(),
72 | onreadystatechange: jest.fn(),
73 | };
74 | });
75 |
76 | global.gBrowser = {
77 | loadOneTab: (targetUrl = '', obj = {}) => {
78 | if (targetUrl === '' || Object.keys(obj).length === 0) {
79 | throw new Error('missing params');
80 | }
81 | Zotero.viewerOpen = true;
82 | return;
83 | },
84 | };
85 |
86 | global.alert = jest.fn();
87 |
88 | global.Services = {
89 | prefs: {
90 | getBranch: function () {
91 | return {
92 | getPrefType: function (val) {
93 | return 'number';
94 | },
95 | setBoolPref: function () {
96 | return true;
97 | },
98 | setCharPref: function () {
99 | return true;
100 | },
101 | setIntPref: function () {
102 | return true;
103 | },
104 | getBoolPref: function () {},
105 | getCharPref: function () {},
106 | getIntPref: function () {},
107 | clearUserPref: function () {
108 | return true;
109 | },
110 | PREF_BOOL: 'boolean',
111 | PREF_STRING: 'string',
112 | PREF_INT: 'number',
113 | };
114 | },
115 | },
116 | };
117 |
118 | global.Components = {
119 | interfaces: {
120 | nsIWindowWatcher: '',
121 | },
122 | utils: {
123 | import: function (val) {
124 | return true;
125 | },
126 | },
127 | classes: {
128 | '@mozilla.org/embedcomp/window-watcher;1': {
129 | getService: function () {
130 | return {
131 | openWindow: function () {
132 | return {
133 | closed: false,
134 | };
135 | },
136 | };
137 | },
138 | },
139 | },
140 | };
141 |
--------------------------------------------------------------------------------
/src/prefs.xhtml:
--------------------------------------------------------------------------------
1 |