├── .eslintignore ├── .eslintrc.json ├── .github └── workflows │ └── release.yml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── README.md ├── chrome.manifest ├── content ├── overlay.xul ├── preferences.xul └── zotero-auto-index.ts ├── defaults └── preferences │ ├── defaults.coffee │ └── defaults.js.map ├── esbuild.js ├── locale └── en-US │ ├── zotero-auto-index.dtd │ └── zotero-auto-index.properties ├── package-lock.json ├── package.json ├── skin └── default │ ├── auto-index.svg │ └── overlay.css ├── tsconfig.json └── zotero-plugin.ini /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.d.ts 3 | generator-temp 4 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "browser": true, 5 | "es6": true, 6 | "node": true 7 | }, 8 | "extends": [ 9 | "eslint:recommended", 10 | "plugin:@typescript-eslint/recommended", 11 | "plugin:@typescript-eslint/eslint-recommended", 12 | "plugin:@typescript-eslint/recommended-requiring-type-checking" 13 | ], 14 | "parser": "@typescript-eslint/parser", 15 | "parserOptions": { 16 | "project": "tsconfig.json", 17 | "sourceType": "module" 18 | }, 19 | "plugins": [ 20 | "eslint-plugin-import", 21 | "eslint-plugin-prefer-arrow", 22 | "@typescript-eslint", 23 | "@typescript-eslint/eslint-plugin" 24 | ], 25 | "rules": { 26 | "@typescript-eslint/adjacent-overload-signatures": "error", 27 | "@typescript-eslint/array-type": [ 28 | "error", 29 | { 30 | "default": "array" 31 | } 32 | ], 33 | "@typescript-eslint/await-thenable": "error", 34 | "@typescript-eslint/ban-ts-comment": "warn", 35 | "@typescript-eslint/ban-types": [ 36 | "warn", 37 | { 38 | "types": { 39 | "Object": { 40 | "message": "Avoid using the `Object` type. Did you mean `object`?" 41 | }, 42 | "Function": { 43 | "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." 44 | }, 45 | "Boolean": { 46 | "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" 47 | }, 48 | "Number": { 49 | "message": "Avoid using the `Number` type. Did you mean `number`?" 50 | }, 51 | "String": { 52 | "message": "Avoid using the `String` type. Did you mean `string`?" 53 | }, 54 | "Symbol": { 55 | "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" 56 | } 57 | } 58 | } 59 | ], 60 | "@typescript-eslint/consistent-type-assertions": "error", 61 | "@typescript-eslint/dot-notation": "error", 62 | "@typescript-eslint/explicit-module-boundary-types": "warn", 63 | "@typescript-eslint/indent": [ 64 | "error", 65 | 2 66 | ], 67 | "@typescript-eslint/member-delimiter-style": [ 68 | "error", 69 | { 70 | "multiline": { 71 | "delimiter": "none", 72 | "requireLast": false 73 | }, 74 | "singleline": { 75 | "delimiter": "comma", 76 | "requireLast": false 77 | } 78 | } 79 | ], 80 | "@typescript-eslint/member-ordering": "off", 81 | "@typescript-eslint/naming-convention": "off", 82 | "@typescript-eslint/no-array-constructor": "error", 83 | "@typescript-eslint/no-empty-function": "error", 84 | "@typescript-eslint/no-empty-interface": "error", 85 | "@typescript-eslint/no-explicit-any": "off", 86 | "@typescript-eslint/no-extra-non-null-assertion": "error", 87 | "@typescript-eslint/no-extra-semi": "error", 88 | "@typescript-eslint/no-floating-promises": "error", 89 | "@typescript-eslint/no-for-in-array": "error", 90 | "@typescript-eslint/no-implied-eval": "off", 91 | "@typescript-eslint/no-inferrable-types": "error", 92 | "@typescript-eslint/no-misused-new": "error", 93 | "@typescript-eslint/no-misused-promises": "error", 94 | "@typescript-eslint/no-namespace": "error", 95 | "@typescript-eslint/no-non-null-asserted-optional-chain": "error", 96 | "@typescript-eslint/no-non-null-assertion": "warn", 97 | "@typescript-eslint/no-parameter-properties": "off", 98 | "@typescript-eslint/no-shadow": [ 99 | "error", 100 | { 101 | "hoist": "all" 102 | } 103 | ], 104 | "@typescript-eslint/no-this-alias": "error", 105 | "@typescript-eslint/no-unnecessary-type-assertion": "error", 106 | "@typescript-eslint/no-unsafe-assignment": "off", 107 | "@typescript-eslint/no-unsafe-call": "off", 108 | "@typescript-eslint/no-unsafe-member-access": "off", 109 | "@typescript-eslint/no-unsafe-return": "error", 110 | "@typescript-eslint/no-unused-expressions": "error", 111 | "@typescript-eslint/no-unused-vars": [ 112 | "error", 113 | { 114 | "argsIgnorePattern": "^_" 115 | } 116 | ], 117 | "@typescript-eslint/no-use-before-define": "off", 118 | "@typescript-eslint/no-var-requires": "off", 119 | "@typescript-eslint/prefer-as-const": "error", 120 | "@typescript-eslint/prefer-for-of": "error", 121 | "@typescript-eslint/prefer-function-type": "error", 122 | "@typescript-eslint/prefer-namespace-keyword": "error", 123 | "@typescript-eslint/prefer-regexp-exec": "off", 124 | "@typescript-eslint/quotes": [ 125 | "error", 126 | "single", 127 | { 128 | "avoidEscape": true 129 | } 130 | ], 131 | "@typescript-eslint/require-await": "error", 132 | "@typescript-eslint/restrict-plus-operands": "error", 133 | "@typescript-eslint/restrict-template-expressions": "off", 134 | "@typescript-eslint/semi": [ 135 | "error", 136 | "never" 137 | ], 138 | "@typescript-eslint/triple-slash-reference": [ 139 | "error", 140 | { 141 | "path": "always", 142 | "types": "prefer-import", 143 | "lib": "always" 144 | } 145 | ], 146 | "@typescript-eslint/unbound-method": "error", 147 | "@typescript-eslint/unified-signatures": "error", 148 | "arrow-body-style": "error", 149 | "arrow-parens": [ 150 | "error", 151 | "as-needed" 152 | ], 153 | "brace-style": [ 154 | "error", 155 | "stroustrup", 156 | { 157 | "allowSingleLine": true 158 | } 159 | ], 160 | "comma-dangle": [ 161 | "error", 162 | { 163 | "objects": "always-multiline", 164 | "arrays": "always-multiline", 165 | "functions": "never" 166 | } 167 | ], 168 | "complexity": "off", 169 | "constructor-super": "error", 170 | "curly": [ 171 | "error", 172 | "multi-line" 173 | ], 174 | "eol-last": "error", 175 | "eqeqeq": [ 176 | "error", 177 | "smart" 178 | ], 179 | "guard-for-in": "error", 180 | "id-blacklist": [ 181 | "error", 182 | "any", 183 | "Number", 184 | "number", 185 | "String", 186 | "string", 187 | "Boolean", 188 | "boolean", 189 | "Undefined", 190 | "undefined" 191 | ], 192 | "id-match": "error", 193 | "import/order": "off", 194 | "linebreak-style": [ 195 | "error", 196 | "unix" 197 | ], 198 | "max-classes-per-file": "off", 199 | "max-len": [ 200 | "warn", 201 | { 202 | "code": 240 203 | } 204 | ], 205 | "new-parens": "off", 206 | "no-array-constructor": "off", 207 | "no-bitwise": "error", 208 | "no-caller": "error", 209 | "no-cond-assign": "off", 210 | "no-console": "error", 211 | "no-debugger": "error", 212 | "no-empty": [ 213 | "error", 214 | { 215 | "allowEmptyCatch": true 216 | } 217 | ], 218 | "no-empty-function": "off", 219 | "no-eval": "error", 220 | "no-extra-semi": "off", 221 | "no-fallthrough": "off", 222 | "no-implied-eval": "off", 223 | "no-invalid-this": "off", 224 | "no-irregular-whitespace": "error", 225 | "no-magic-numbers": "off", 226 | "@typescript-eslint/no-magic-numbers": [ "error", { 227 | "ignore": [ -1, 0, 1, 2 ], 228 | "ignoreEnums": true 229 | }], 230 | "no-new-wrappers": "error", 231 | "no-redeclare": "error", 232 | "no-throw-literal": "error", 233 | "no-trailing-spaces": "error", 234 | "no-undef-init": "error", 235 | "no-underscore-dangle": [ 236 | "error", 237 | { 238 | "allowAfterThis": true 239 | } 240 | ], 241 | "no-unsafe-finally": "error", 242 | "no-unused-labels": "error", 243 | "no-unused-vars": "off", 244 | "no-var": "error", 245 | "object-shorthand": "error", 246 | "one-var": [ 247 | "off", 248 | "never" 249 | ], 250 | "prefer-arrow/prefer-arrow-functions": [ 251 | "error", 252 | { 253 | "allowStandaloneDeclarations": true 254 | } 255 | ], 256 | "prefer-const": [ 257 | "error", 258 | { 259 | "destructuring": "all" 260 | } 261 | ], 262 | "prefer-object-spread": "error", 263 | "prefer-template": "error", 264 | "quote-props": [ 265 | "error", 266 | "as-needed" 267 | ], 268 | "radix": "off", 269 | "require-await": "off", 270 | "space-before-function-paren": [ 271 | "error", 272 | { 273 | "anonymous": "never", 274 | "named": "never", 275 | "asyncArrow": "always" 276 | } 277 | ], 278 | "spaced-comment": [ 279 | "error", 280 | "always", 281 | { 282 | "markers": [ 283 | "/" 284 | ] 285 | } 286 | ], 287 | "use-isnan": "error", 288 | "valid-typeof": "off", 289 | "yoda": "error", 290 | "@typescript-eslint/consistent-type-definitions": "off", 291 | "no-new-func": "off" 292 | }, 293 | "ignorePatterns": [ 294 | "webpack.config.ts", 295 | "util/*.ts", 296 | "minitests/*.ts", 297 | "content/minitests/*.ts" 298 | ] 299 | } 300 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: null 5 | 6 | jobs: 7 | release: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: install node 12 | uses: actions/setup-node@v1 13 | with: 14 | node-version: 14.x 15 | - name: Cache node dependencies 16 | uses: actions/cache@v2 17 | env: 18 | cache-name: cache-dependencies 19 | with: 20 | path: | 21 | ~/.npm 22 | key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} 23 | - name: install node dependencies 24 | run: npm install 25 | - name: build 26 | run: | 27 | npm run build 28 | ls xpi 29 | - name: release 30 | run: | 31 | ls xpi 32 | npm run release 33 | env: 34 | GITHUB_TOKEN: ${{ github.token }} 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .eslintcache 2 | .DS_Store 3 | wiki 4 | gen 5 | build 6 | *~ 7 | *.swp 8 | *.debug 9 | *.cache 10 | *.status 11 | *.js.map 12 | *.tmp 13 | *.xpi 14 | node_modules 15 | .env 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/retorquere/zotero-auto-index/73603df1010b94a952ae6232f7a901ed8b7528a9/.gitmodules -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8" 4 | cache: npm 5 | install: 6 | - npm install 7 | script: 8 | - npm run build 9 | - npm run release 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | zotero-auto-index 2 | ================= 3 | 4 | Now compatible with Zotero 5. Install by downloading the [latest version](https://github.com/retorquere/zotero-auto-index/releases/latest) 5 | 6 | Automatically keeps your attachments indexed. Preferences can be tweaked in the Zotero `Search` settings. 7 | 8 | # Support - read carefully 9 | 10 | My time is extremely limited for a number of very great reasons (you shall have to trust me on this). Because of this, I 11 | cannot accept bug reports 12 | or support requests on anything but the latest version. If you submit an issue report, 13 | please include the version that you are on. By the time I get to your issue, the latest version might have bumped up 14 | already, and you 15 | will have to upgrade (you might have auto-upgraded already however) and re-verify that your issue still exists. 16 | Apologies for the inconvenience, but such 17 | are the breaks. 18 | 19 | -------------------------------------------------------------------------------- /chrome.manifest: -------------------------------------------------------------------------------- 1 | content zotero-auto-index content/ 2 | locale zotero-auto-index en-US locale/en-US/ 3 | skin zotero-auto-index default skin/ 4 | 5 | overlay chrome://zotero/content/zoteroPane.xul chrome://zotero-auto-index/content/overlay.xul 6 | -------------------------------------------------------------------------------- /content/overlay.xul: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |