0x6b / copy-selection-as-markdown

Firefox add-on to copy selection as Markdown
https://addons.mozilla.org/en-US/firefox/addon/copy-selection-as-markdown/
MIT License
190 stars 14 forks source link

feat: Chromium support #95

Closed 0x6b closed 3 years ago

0x6b commented 3 years ago

Chrome version is not published at Chrome Web Store, but you can use this extension by building it locally/manually. See also #50.

  1. Clone this repository
  2. Build dependencies: npm i
  3. Build extensions: npm run build
  4. Load packages/chromium/ directory as unpacked extension. See Getting started - Chrome Developers:

    The directory holding the manifest file can be added as an extension in developer mode in its current state.

allenyllee commented 3 years ago

Do you consider to publish it to Chrome store? Or you never want?

lamyergeier commented 8 months ago

@0x6b

HEAD is now at 6b8b713 release v0.21.0
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated @babel/plugin-proposal-unicode-property-regex@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
npm WARN deprecated @babel/plugin-proposal-optional-catch-binding@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/plugin-proposal-private-property-in-object@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
npm WARN deprecated @babel/plugin-proposal-dynamic-import@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.
npm WARN deprecated @babel/plugin-proposal-private-methods@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm WARN deprecated @babel/plugin-proposal-json-strings@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.
npm WARN deprecated @babel/plugin-proposal-export-namespace-from@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-class-static-block@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead.
npm WARN deprecated @babel/plugin-proposal-logical-assignment-operators@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated @babel/plugin-proposal-async-generator-functions@7.14.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.14.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.14.5: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated abab@2.0.5: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated domexception@2.0.1: Use your platform's native DOMException instead
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated sign-addon@3.5.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated event-to-promise@0.8.0: Use promise-toolbox/fromEvent instead
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated dispensary@0.62.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@3.12.0: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js-pure@3.15.1: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.

added 1429 packages, and audited 1432 packages in 54s

99 packages are looking for funding
  run `npm fund` for details

49 vulnerabilities (1 low, 17 moderate, 22 high, 9 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> build
> run-s build:core build:firefox

> build:core
> yarn workspace copy-selection-as-markdown-core build

! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager

yarn workspace v1.22.19
yarn run v1.22.19
$ npm-run-all clean

> copy-selection-as-markdown-core@0.19.0 clean
> rimraf dist/*

$ webpack
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
node:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at BulkUpdateDecorator.hashFactory (/mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/util/createHash.js:145:18)
    at BulkUpdateDecorator.update (/mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/NormalModule.js:868:17)
    at handleParseResult (/mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/NormalModule.js:934:10)
    at /mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/NormalModule.js:1026:4
    at processResult (/mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/NormalModule.js:743:11)
    at /mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/node_modules/webpack/lib/NormalModule.js:807:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.7.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /mnt/Data/opt/.nvm/versions/node/v20.7.0/bin/node
Arguments: /home/lamy/.cache/node/corepack/v1/yarn/1.22.19/lib/cli.js build
Directory: /mnt/Data/opt/Git/Chrome/copy-selection-as-markdown/packages/core
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
ERROR: "build:core" exited with 1.