{"_id":"@altlab/click-in-text","_rev":"7-92112693ea7cc68a89d33dfcd0a6e98d","name":"@altlab/click-in-text","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.0":{"name":"@altlab/click-in-text","version":"0.0.0","description":"Cree click-in-text plugin","scripts":{"build":"cross-env NODE_ENV=production webpack && ts-node libexec/fix-non-ascii-contentscript.ts && ts-node libexec/zip-extension.ts","build_dist":"cross-env NODE_ENV=production webpack","dev":"webpack --watch","test":"ts-node libexec/integration-test.ts","lint":"eslint . --ext .ts,.js","lint-fix":"eslint --fix . --ext .ts,.js"},"devDependencies":{"@altlab/types":"^1.1.1","@types/chrome":"0.0.127","@types/jquery":"^3.5.5","@types/node":"^14.14.11","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","clean-webpack-plugin":"^1.0.0","copy-webpack-plugin":"^4.6.0","cross-env":"^7.0.2","cypress":"^3.3.2","eslint":"^7.0.0","eslint-plugin-cypress":"^2.11.2","html-loader":"^1.3.2","http-server":"^0.11.1","jszip":"^3.5.0","npx":"^10.2.0","raw-loader":"^4.0.2","recursive-readdir":"^2.2.2","source-map-loader":"^1.1.3","ts-loader":"^8.0.11","ts-node":"^9.1.1","typescript":"^4.1.2","wait-on":"^3.2.0","webpack":"^4.28.2","webpack-cli":"^3.1.2"},"dependencies":{"debug":"^4.1.1","jquery":"^3.5.0","xregexp":"^4.2.0"},"gitHead":"bcc345cc6e6f4e7b11609e4f048618b0a8b6c372","_id":"@altlab/click-in-text@0.0.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-e6Z5apu/ErcP0x6yzhfl6bK+MXrZRg4KvBt9M8jRpOaeeBA5boFbIg0Lg/hoAqazDogFvaTPZVqx68k4Zn88tA==","shasum":"02fb0d69d5f3c3cbe75ff06328f3f09b45d693a6","tarball":"https://registry.npmjs.org/@altlab/click-in-text/-/click-in-text-0.0.0.tgz","fileCount":3,"unpackedSize":591192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7Z5iCRA9TVsSAnZWagAAm+YP+QHpZsqlP2V1c61qSyYK\nflDC/pOi4YnPfQ0K7kL4hEZjzQdEb56pl9rk5+j1sHI4UPKVkwTyQDZY3Ld8\nDqhXDRsbdef3y9BILGYMllBljg3VeRNNF+9CnPWW8FmuhizU2G1WLZnKzhRl\nvqJHxaasCjgSjW57jx1pywOF43cFgGOIwQ3g43ncC1MGw8bLDrX3V0GKil5+\nK/ahSiuUHFoC04A+h/7ZxCY6zq4USjVvGzPXciVKxoTpbyEq8QRGaazwKOVW\n+Ml9rf2IacQPNxcsN61fL+wWHVj/vEB7T8PuiSYJIuW1mVGbVd2yxzw2Qnr/\nFJjAA7eT1GfNxWAnBIhC87QHQsOyXeyWSi+cAiHSZ5IjE1HvcEOJ7UIzZWjb\nDUhIqQAmLTtZHi85hDRxy7OpS/H9pWa7+DU/9CphcQg+PQGLd0wTSvBixJT1\nVz1zlV5IG9leXC+DO2ocxhNlQfCMPhRw9IM2kgdftuW8aGCqZuiiT2zQMnJn\nfpyzC3ZpK002PJTCYdIxYggQHJkOq0hCF9pw/QsLpIV9I0q+6/c5NBZDawQs\nWl0/4G250wNAuljFTRZGwNWAsxnHH+z0pPAzRGZkNoUk50w+zPZGTIsB2y+H\n0yySBpZax8pSH+H8P6b2mhSHFcm86lL7xyhxRcT9fQMitXKU0hqdus7MQE11\nS/Fw\r\n=ORD8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfwM3LCPKL7DQwG2DTpaxGsZLpvk+XSDlRBjkuTeiiXAiBZ69GO/mTEuY05SZZQ1bWFFUYjrUqISORdzo0yevw8Kg=="}]},"_npmUser":{"name":"madoshakalaka","email":"syan4@ualberta.ca"},"directories":{},"maintainers":[{"name":"madoshakalaka","email":"syan4@ualberta.ca"},{"name":"eddieantonio","email":"easantos@ualberta.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/click-in-text_0.0.0_1609408097930_0.8982046404997723"},"_hasShrinkwrap":false},"0.1.0":{"name":"@altlab/click-in-text","version":"0.1.0","description":"Cree click-in-text plugin","scripts":{"build":"cross-env NODE_ENV=production webpack && ts-node libexec/fix-non-ascii-contentscript.ts && ts-node libexec/zip-extension.ts","build_dist":"cross-env NODE_ENV=production webpack","prepublish":"npm run build_dist","dev":"webpack --watch","test":"ts-node libexec/integration-test.ts","lint":"eslint . --ext .ts,.js","lint-fix":"eslint --fix . --ext .ts,.js"},"devDependencies":{"@altlab/types":"^1.1.1","@types/chrome":"0.0.127","@types/jquery":"^3.5.5","@types/node":"^14.14.11","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","clean-webpack-plugin":"^1.0.0","copy-webpack-plugin":"^4.6.0","cross-env":"^7.0.2","cypress":"^3.3.2","eslint":"^7.0.0","eslint-plugin-cypress":"^2.11.2","html-loader":"^1.3.2","http-server":"^0.11.1","jszip":"^3.5.0","npx":"^10.2.0","raw-loader":"^4.0.2","recursive-readdir":"^2.2.2","source-map-loader":"^1.1.3","ts-loader":"^8.0.11","ts-node":"^9.1.1","typescript":"^4.1.2","wait-on":"^3.2.0","webpack":"^4.28.2","webpack-cli":"^3.1.2"},"dependencies":{"debug":"^4.1.1","jquery":"^3.5.0","xregexp":"^4.2.0"},"gitHead":"6d97d7a385772fe27f8fad4045b948155fbdf13e","_id":"@altlab/click-in-text@0.1.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-2r6ucF+K9UFip8YXHnGZCGSgdNUmqpPUauiMwgZP79HGrE6l1OLUwuNFdmK3EZI/JthzOmAn8PutL9Mc7xpcyg==","shasum":"beb102605e530cf1f8660e51ada053e2319fc7e0","tarball":"https://registry.npmjs.org/@altlab/click-in-text/-/click-in-text-0.1.0.tgz","fileCount":3,"unpackedSize":215106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJag4CRA9TVsSAnZWagAArqAP/iBQtgGS9zHCBZjvzH60\nyrKkOqDIqYzeu5jXZbBpzUzg07mXJy7ayBxHbfRv+o8IOsNQW+hDhaiv9SDo\nRCt/H7v+fZAZ6YD/IexMKrfpd8cYU6SGatfy2mOvE4cOaWoYx74PowK0yqnG\n8DREAVF23fJif5lkcnfir3VFr2GtNbgW/kivgCOE0ZTz1UdyZVkGZqPXPPzE\nv/vLuuoNpxYKeGHG0SnJJIQRWW0+zGUeFCjWEDnd384wToPFTaJoho7mEDSM\npf5BV2Z/SqVF5VT2zax82UFkIUEBr4L0Pgcat4K8Nj29N5GbevEOpCw0ReB1\ng1vEFfWdLM19wakkXA4gxP6pJZDW6n4WDCeETSAsOO/IgfU8DqcAXr/nWYO+\nMrLVwPxkXeGDzDC2oOAHazmSD1wfo3K8N4ykSfFMwaztXRdPAJJEdrMsJrTV\neaImdY4T2ihETr1K2mYIIyNDSfHefvWlgGy2f8LMLq+Xkv5tLw1/oBHdJaIq\nJ8A48rRIFsG3auGn7QwlHpJwuTX+0ndCAYQUM2F/obptEl79zbXFD6a0ESOm\nYw/RXHpR9ZnnenOnzRt70EmdZaAmtWvTs5vH/CHrRrfr9xUV9hScgPKQQZDp\nSb2L4/BHKIfnWHzetO2v6UI1DZTqxmCtMcg9MLFk32pWOCnXsxzlsoy1T7oX\nKZoK\r\n=bFaG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqDMyIqyfb7kcaxlv695sQGomlwgGYC86Ps703KTgzOAiEA4xe69qJJwmBUhmzUnuW3bNjDY03fWBV6ErQvir2PrkY="}]},"_npmUser":{"name":"eddieantonio","email":"easantos@ualberta.ca"},"directories":{},"maintainers":[{"name":"dwhieb","email":"dwhieb@gmail.com"},{"name":"madoshakalaka","email":"syan4@ualberta.ca"},{"name":"eddieantonio","email":"easantos@ualberta.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/click-in-text_0.1.0_1613080632260_0.8732533831761244"},"_hasShrinkwrap":false},"0.1.1":{"name":"@altlab/click-in-text","version":"0.1.1","description":"Cree click-in-text plugin","scripts":{"build":"cross-env NODE_ENV=production webpack && ts-node libexec/fix-non-ascii-contentscript.ts && ts-node libexec/zip-extension.ts","build_dist":"cross-env NODE_ENV=production webpack","preinstall":"npx npm-force-resolutions","prepublish":"npm run build_dist","dev":"webpack --watch","test":"ts-node libexec/integration-test.ts","lint":"eslint . --ext .ts,.js","lint-fix":"eslint --fix . --ext .ts,.js"},"devDependencies":{"@types/chrome":"0.0.127","@types/jquery":"^3.5.5","@types/node":"^14.14.11","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","clean-webpack-plugin":"^1.0.0","copy-webpack-plugin":"^4.6.0","cross-env":"^7.0.2","cypress":"^7.0.1","eslint":"^7.0.0","eslint-plugin-cypress":"^2.11.2","html-loader":"^1.3.2","http-server":"^0.12.3","jszip":"^3.5.0","npm-force-resolutions":"0.0.10","raw-loader":"^4.0.2","recursive-readdir":"^2.2.2","source-map-loader":"^1.1.3","ts-loader":"^8.0.11","ts-node":"^9.1.1","typescript":"^4.1.2","wait-on":"^3.2.0","webpack":"^4.28.2","webpack-cli":"^3.1.2"},"dependencies":{"debug":"^4.1.1","jquery":"^3.5.0","xregexp":"^4.2.0"},"resolutions":{"serialize-javascript":"4.0.0","minimist":"1.2.5"},"gitHead":"3b73c0487c82e15ed2c3437a8bd4c968e0bb14a8","_id":"@altlab/click-in-text@0.1.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-2eBnVWuBgTI9Bs45R+TU7d6V2riank8KS+ve6PTir8Qd2nHiQDpjkdKS4458oC0t4O5VcPtJsVgLLKvUgCYIyQ==","shasum":"4691458804c5d647481f5d8b76b2c7ef3e999a8f","tarball":"https://registry.npmjs.org/@altlab/click-in-text/-/click-in-text-0.1.1.tgz","fileCount":3,"unpackedSize":215630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbmsyCRA9TVsSAnZWagAAftYP/2ZgtirfHHvM1FJPnp/i\nQoM4tgWPk9nXz4LjDc7rGLveMqwWe+hc5jYDZy3URsVZzy3iF9bKkxaWsZFQ\nsCVXq3d/J/TYb3O5Vgd35eJ5ulk16ONngK66LqZenRQnDT25ZomuUn/AlAoD\n6QeUYQo5218LgZQ8/5M5LFvcH/69oIK4mZ/k1xAZ/ehPJTRjVsuYAjoEeLFB\n+9CD6MtyKVMN/ykeqzUyNnlfll8YaDS1aoL9J34LFsDkFgBjH6KZeA6jmpGm\n7NI2C+8JknWKoe+XNkBpcMk2PC+lxQzVwR2ri8Q3WYJFsdBdkAzVKnZWzcDW\nL+Vh6dIK+xm6Q0M5AIoWM91vt0jBphpBuL1GmP2A2k5hiXyCKjcdbJf0faGT\noWrYBPs2AnkBxTqLsJlIVwS8OKmT/6l1PGobVlaqisKCcEbmyz4086bJNPil\nveAAY5Qa6UDbGbG7q6rVAwGryw6tHKHhQLKdm5hHUXAJcixDt2AYlXiYV905\nN6b0IVMSFCXRXt7GCEBsUc6ue32npVOVieGid3iGKaGHImSKLvFQdS4UUV4z\nzaUZgO8hVoTv0fdTm8jdqhs4Xbqtib/aS0WjmrZOYFIML8SV8apQ8I6Ju+4p\nIokGMkirGNduBCjY8TDtSYb9peDt8VbxEMWJNLJg74kuGF98jI9PRnXbz/DP\np9Jz\r\n=Qiah\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVtzuSuy0ydZ512jz5TWRYN3Igqsjy0/h5ImWs0jo3fAiEA1zJ23MiLP+66pKxNpZQrUx+UL8ZwAV9U44Y1WKRUUFU="}]},"_npmUser":{"name":"dwhieb","email":"dwhieb@gmail.com"},"directories":{},"maintainers":[{"name":"dwhieb","email":"dwhieb@gmail.com"},{"name":"madoshakalaka","email":"syan4@ualberta.ca"},{"name":"eddieantonio","email":"easantos@ualberta.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/click-in-text_0.1.1_1617849137520_0.6684907867599141"},"_hasShrinkwrap":false},"0.1.2":{"name":"@altlab/click-in-text","version":"0.1.2","description":"Cree click-in-text plugin","scripts":{"build":"cross-env NODE_ENV=production webpack && ts-node libexec/fix-non-ascii-contentscript.ts && ts-node libexec/zip-extension.ts","build_dist":"cross-env NODE_ENV=production webpack","prepack":"yarn run build_dist","dev":"webpack --watch","test":"ts-node libexec/integration-test.ts","lint":"eslint . --ext .ts,.js","lint-fix":"eslint --fix . --ext .ts,.js"},"devDependencies":{"@types/chrome":"0.0.127","@types/jquery":"^3.5.5","@types/node":"^14.14.11","@typescript-eslint/eslint-plugin":"^4.9.1","@typescript-eslint/parser":"^4.9.1","clean-webpack-plugin":"^1.0.0","copy-webpack-plugin":"^4.6.0","cross-env":"^7.0.2","cypress":"^7.0.1","eslint":"^7.0.0","eslint-plugin-cypress":"^2.11.2","html-loader":"^1.3.2","jszip":"^3.5.0","local-web-server":"^4.2.1","raw-loader":"^4.0.2","recursive-readdir":"^2.2.2","source-map-loader":"^1.1.3","ts-loader":"^8.0.11","ts-node":"^9.1.1","typescript":"^4.1.2","wait-on":"^3.2.0","webpack":"^4.28.2","webpack-cli":"^3.1.2"},"dependencies":{"debug":"^4.1.1","jquery":"^3.5.0","xregexp":"^4.2.0"},"resolutions":{"serialize-javascript":"4.0.0","minimist":"1.2.5","ssri":">=8.0.1"},"gitHead":"e38f6ab040058d18207f2926a04c49212a912ded","_id":"@altlab/click-in-text@0.1.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-xfWZVW+yBCvlalhn6NhREf+lxwfcagTdd/1dD0lyRrZkZhu2MWLJByXJ3VC5wBOky/5Kzu+IcpuDDWVLIMRizw==","shasum":"7b304219f20e3c0683770c6abd8feb3c4f3c3be8","tarball":"https://registry.npmjs.org/@altlab/click-in-text/-/click-in-text-0.1.2.tgz","fileCount":3,"unpackedSize":215588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb3GbCRA9TVsSAnZWagAAV+cP/1EzPlptgq1rKUNUoFp8\ncX537TeLFcbB1isDZET6pL3LKkaD238vlXy/Kw4DcPkfKcyQUCw57mVpqp2O\nvdzZIDKNThAnTHYwG6YlMPEZ3aEwx4GYXtCEkh4Z4hwUK/j6DXQBzQEuFRwD\nwLxDCuhsRi3c5gS8318QrolTen47fbbXFcj6nGMDiyOlWTKRVNA4z9VS1D5K\n+I8jRjL+nuFiv+8sAGsIjDAGRhs/oTauRwZoyayKI5UCT2kys5rw8SE+kyyU\nVNSoGAx0MLikt3raoOiX3TQhgkFBALAfy4fdYP0oL4cYkesr6qiQESWCyvOC\nErAKo9h6agG9aNmxamOb59j6F+2bH4+Wv3+eEGouu044e9ooM1GXvdqJn4C8\najQPano62MCoCKFnfnWmI2LcxgMXYuTquKtiA+FFAI4c64912nSHX7ZAtQH/\n04h3I8C5ATQ8Iag/LLAhKWazFOD/W3bnEUuCSsFN0H3s9TEEKv9lF75MyuUQ\nGBg3zAt+hP3KFi7JP3VhL9KCYHZ7k7boMB8Y8iPm9GS1A3l8tGdVkCV8+ytS\niLTrf6lvkhqYUZukNu9CG5INoqyLlrI1ZaGmOwnLBUp+IpjygK7EqqRd4x6/\nb+4a0XyPdZmDZiVaKsiLiFlYGWaLtMd3D8LIjA1jpN54i+aibhnIyml+P4QK\nMwpP\r\n=5UFH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqy3b/HjdvMyKIL/fM0PQ/AUxSZW8n5idQ3MPhxOrUJAiBUKgFpVNJ22Je227GTUhJtWyS7bhIZgbc5WzRSm/BsEA=="}]},"_npmUser":{"name":"dwhieb","email":"dwhieb@gmail.com"},"directories":{},"maintainers":[{"name":"dwhieb","email":"dwhieb@gmail.com"},{"name":"madoshakalaka","email":"syan4@ualberta.ca"},{"name":"eddieantonio","email":"easantos@ualberta.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/click-in-text_0.1.2_1617916315364_0.5186597555984447"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-31T09:48:17.708Z","0.0.0":"2020-12-31T09:48:18.168Z","modified":"2022-04-04T13:40:24.477Z","0.1.0":"2021-02-11T21:57:12.363Z","0.1.1":"2021-04-08T02:32:17.712Z","0.1.2":"2021-04-08T21:11:55.489Z"},"maintainers":[{"email":"jcpoulin@ualberta.ca","name":"nienna73"},{"email":"andrew@neitsch.ca","name":"andrewdotn"},{"email":"dwhieb@gmail.com","name":"dwhieb"},{"email":"syan4@ualberta.ca","name":"madoshakalaka"},{"email":"easantos@ualberta.ca","name":"eddieantonio"}],"description":"Cree click-in-text plugin","readme":"# Click-In-Text-Chrome\r\n\r\nAdapted from [TransOver](https://github.com/artemave/translate_onhover), the amazing chrome extension under MIT license\r\n\r\nIf you don't know much about chrome extensions: \\\r\nRead [google extension official overview](https://developer.chrome.com/extensions/overview) to know the basic relationship of the files.\r\nSpecifically `contentscript.js` `background.js`.\r\n\r\n## Install\r\n\r\nUnder project root directory\r\n\r\n- `yarn`\r\n\r\n## Directory Structure\r\n\r\n##### What's compiled by webpack and goes into zipped build\r\n\r\n`./src/icons`: Icon of this extension in different resolution. Check `./icons/README.md` for how to generate icons.\r\n\r\n`./src/lib`: Core Javascript code that are reusable (browser invariant). \r\nECMAScript Module is used.\r\n\r\n`./src/browser/background.ts` `./src/browser/contentscript.ts` `./options.html`: Chrome-extension specific files\r\n\r\n##### Others\r\n\r\n`./libexec`: build/dev scripts. Node scripts are preferred over shell script for cross-platform compatibility. \r\n\r\n`./src/embedded/test.html`: Test page for cypress to test the UI of the extension.\r\n\r\n`./src/test.ts`: Test script that goes with `test.html` to make sure core javascript code and can be thoroughly tested. \r\nIt basically mocks the functions in `contentscript.ts` and `background.ts` to run the plugin.\r\n\r\n### why `./src/test.ts`\r\n\r\nWe use cypress to do integration tests,\r\nwhile it's not possible to test the plugin's UI as a specific browser plugin as cypress lacks the access to their API.\r\nFor example in cypress you can't detect plugin menu on the upper right side of Chrome.\r\nYou can't open `options.html` as a chrome plugin settings page \r\nbecause it's not possible for cypress to click on the menu nor get the url of the page \r\n(which is allocated by chrome and only accessible through chrome API `getURL`, \r\nthe `crhome://extensions/safdjsaifjg/options.html` url you'll see in the browser is understood\r\n and routed by chrome and it's not possible to visit inside cypress)\r\n \r\n`test.ts` mocks the browser apis to make the extension code work embedded on a web-page.\r\n\r\n## Development Routine\r\n\r\n\r\n1. `yarn dev` (This will watch file changes and repack everything to `./dist` upon file change)\r\n\r\n2. Write some bugs. Files will be regenerated in `./dist`\r\n\r\n3. Test as embedded javascript: Make sure you have disabled this extension on your browser. `yarn test` to run cypress tests. (It uses `test.html` `test.ts` and runs the extension code as embedded javascript, as explained earlier)\r\n\r\n4. (Optional) Manual Testing as an extension: Make sure you have installed the extension in development mode as instructed below. The installation only needs to be done once for any browser. Create any new tab or reload an existing tab to test the changes you just made.\r\n\r\n5. Go back to 2. Write more bugs.\r\n\r\n\r\nPro tips/Notes:\r\n\r\n- You can `npx cypress open` and do everything in cypress built-in chrome. Everything will be the same plus at Step 3 You can use\r\ncypress testing UI and make everything faster by omitting the need to restart a browser.\r\n\r\n- As explained earlier. Cypress test at Step 3 tests the extension code as embedded javascript enabled by `test.ts`. Depending on the consistency between `test.ts` and browser API behaviors. Cypress may go through a \r\n different user experience than what a real user would go through via a browser extension. \r\n You may want to do manual testing now and then to really find out.\r\n\r\n- If you frequently do manual testing, step 5 and 6 of going to a different tab to refresh extension and going back to reload page may be exhausting. Use \r\nthis chrome extension as a development tool in your browser.\r\nhttps://chrome.google.com/webstore/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid?hl=en This extension provides\r\na fake url `http://reload.extensions`. You can visit this url on any tab to reload your extension and reload the tab at one go.\r\n\r\n(FYI, if you use cypress browser. Downloaded extensions do persist with your cypress browser over cypress restarts\r\n so you don't need to worry about re-downloading the tool)\r\n\r\n\r\n\r\n## Install dev\r\n\r\n1. On the browser, go to `chrome://extensions`. Toggle on developer mode ![developer_mode.png](readme_assets/developer_mode.png). This enables\r\nyou to load local unzipped directories as chrome extensions.\r\n\r\n2. Click on \"Load unpacked\" ![load_unpacked.png](readme_assets/load_unpacked.png)  and choose the generated `./dist` directory.\r\nThis loads the code generated in `./dist` as a chrome plugin.\r\n\r\n## Linter\r\n\r\nrun `yarn run lint` or `yarn run lint-fix` under project root. \r\n\r\nWe also have a Github action that runs `yarn run lint-fix` and commits automatically to enforce formatting.\r\n\r\n> Just let `yarn` scripts do the work. Do not run `eslint` yourself, it by default only lints `.js` files but not `.ts` files [and it's not configurable through\r\neslintrc](https://github.com/eslint/eslint/issues/11223).\r\n\r\n## Embedded version \r\n\r\nWe publish embedded version on npm with `npm publish`. With our `.npmignore`, only `dist/embedded.js` is published.\r\n\r\nOther website maintainers can include this one liner in their HTML and get click-in-text on their page:\r\n \r\n`<script src=\"https://unpkg.com/@altlab/click-in-text/dist/embedded\"></script>`\r\n\r\nMore todo:\r\n\r\nDo we need an option/configuration page in this embedded version? Current chrome extension supports configuration by\r\na chrome proprietary menu, where you can set things like `translation delay`, `translation key - alt/ctrl`, `hover or click` etc.\r\n\r\nIf we do need a option page for embedded version, in what form do we present the options page? I think a hovering widget\r\nis ideal.\r\n\r\n\r\n## Todo: Adapt to multiple browsers\r\n\r\nSeems like there are ways to write a cross-browser extension in one codebase, \r\nsee more at Mozilla's [Build a cross browser extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension)\r\n","readmeFilename":"README.md"}