├── src-packed ├── settings.js └── README.md ├── .vscode ├── settings.json └── launch.json ├── docs ├── openai.png ├── popup.png ├── artifacts.png ├── openaifirst.png ├── negative-word.png ├── debugging-tests.png ├── negative-sentiment.png ├── negative-word-fixed.png ├── negative-sentiment-fixed.png ├── beta-test.md ├── improve-heuristics.md └── azure-text-analytics.md ├── inclusive.code-workspace ├── store ├── icon.png └── screenshot.png ├── assets ├── model.onnx ├── images │ ├── 20 │ │ ├── white │ │ │ └── icon_20_white_gear.svg │ │ └── black │ │ │ └── icon_20_black_gear.svg │ ├── favicon.ico │ ├── lt-logo.png │ ├── errors │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── 1_premium.png │ │ ├── 2_premium.png │ │ ├── 3_premium.png │ │ ├── 4_premium.png │ │ ├── 5_premium.png │ │ ├── 6_premium.png │ │ ├── 7_premium.png │ │ ├── 8_premium.png │ │ ├── 9_premium.png │ │ ├── 1.svg │ │ ├── 1_premium.svg │ │ ├── 4.svg │ │ ├── 4_premium.svg │ │ ├── 7.svg │ │ ├── 7_premium.svg │ │ ├── 2.svg │ │ ├── 2_premium.svg │ │ ├── 5.svg │ │ ├── 5_premium.svg │ │ ├── 3.svg │ │ ├── 3_premium.svg │ │ ├── 6.svg │ │ ├── 6_premium.svg │ │ └── 8.svg │ ├── hint-arrow.png │ ├── progress.gif │ ├── icons │ │ ├── icon16.png │ │ ├── icon32.png │ │ ├── icon48.png │ │ ├── icon64.png │ │ ├── icon128.png │ │ ├── icon128_white.png │ │ ├── icon16_white.png │ │ ├── icon32_white.png │ │ ├── icon48_white.png │ │ └── icon64_white.png │ ├── progress_2x.gif │ ├── lt-favicon-color.png │ ├── lt-favicon-white.png │ ├── dialog_scroll_hint.gif │ ├── openthesaurus_logo.png │ ├── redesign │ │ ├── icon_read.gif │ │ ├── icon_pause.svg │ │ ├── icon_save.svg │ │ ├── icon_placement_dialog.svg │ │ ├── icon_placement_left.svg │ │ ├── icon_placement_right.svg │ │ ├── icon_ignore.svg │ │ ├── icon_picky.svg │ │ ├── icon_binocular.svg │ │ ├── icon_menu-check.svg │ │ ├── icon_info.svg │ │ ├── icon_close.svg │ │ ├── icon_read.svg │ │ ├── icon_picky-white.svg │ │ ├── icon_disable.svg │ │ ├── icon_feedback.svg │ │ ├── icon_options.svg │ │ ├── icon_help.svg │ │ └── lt-logo.svg │ ├── messages │ │ ├── message_turn_on.gif │ │ └── message_turn_on_safari.gif │ ├── README.md │ ├── lt-favicon-color_notification.png │ ├── lt-favicon-white_notification.png │ ├── flags │ │ ├── de-de.svg │ │ ├── pl-pl.svg │ │ ├── da-dk.svg │ │ ├── uk-ua.svg │ │ ├── de-at.svg │ │ ├── ca-es.svg │ │ ├── ca-es-valencia.svg │ │ ├── fr.svg │ │ ├── ga-ie.svg │ │ ├── it.svg │ │ ├── ru-ru.svg │ │ ├── ro-ro.svg │ │ ├── br-fr.svg │ │ ├── de-ch.svg │ │ ├── no.svg │ │ ├── nl.svg │ │ ├── eo.svg │ │ ├── ja-jp.svg │ │ ├── en-us.svg │ │ ├── en-ca.svg │ │ ├── sv.svg │ │ ├── zh-cn.svg │ │ ├── en-gb.svg │ │ ├── en-za.svg │ │ ├── el-gr.svg │ │ ├── ta-in.svg │ │ ├── sk-sk.svg │ │ ├── not_found.svg │ │ ├── en-au.svg │ │ ├── eu.svg │ │ ├── tl-ph.svg │ │ ├── pt-ao.svg │ │ ├── sl-si.svg │ │ └── pt-mz.svg │ ├── close.svg │ ├── close_white.svg │ ├── new_window_orange.svg │ ├── new_window_white.svg │ ├── managed_login_icon.svg │ ├── toolbar_permission_required.svg │ ├── turnoff.svg │ ├── expand.svg │ ├── done.svg │ ├── icon_speak.svg │ ├── dictionary.svg │ ├── arrow.svg │ ├── blocked.svg │ ├── disabled_domains.svg │ ├── upgrade_bg_orange.svg │ ├── addphrase.svg │ ├── check.svg │ ├── add.svg │ ├── lt-logo.svg │ ├── top.svg │ ├── lt-logo_white.svg │ ├── down.svg │ ├── opera_store.svg │ ├── upgrade_bg.svg │ ├── text_too_long.svg │ ├── edit_white.svg │ ├── close-small.svg │ ├── upgrade_check.svg │ ├── info_black.svg │ ├── validator_has_errors.svg │ ├── dialog_no_errors.svg │ ├── settings.svg │ ├── disabled.svg │ ├── enable.svg │ ├── google_docs_logo.svg │ ├── star.svg │ ├── settings_box_bg.svg │ ├── plus.svg │ ├── ratings │ │ ├── thumpsup.svg │ │ └── thumpsdown.svg │ ├── dialog_update.svg │ ├── dialog_text_too_short.svg │ ├── dialog_disabled.svg │ ├── toolbar_language_not_supported.svg │ ├── validator_has_premium_errors.svg │ ├── dialog_language_not_supported.svg │ ├── on.svg │ ├── gear.svg │ ├── validator_no_errors.svg │ └── dialog_text_too_long.svg └── fonts │ ├── Roboto-Mono-latin-bold.woff2 │ ├── Source-Sans-Pro-greek-mac.woff2 │ ├── Source-Sans-Pro-greek-win.woff2 │ ├── Source-Sans-Pro-latin-mac.woff2 │ ├── Source-Sans-Pro-latin-win.woff2 │ ├── Source-Sans-Pro-cycrillic-mac.woff2 │ ├── Source-Sans-Pro-cycrillic-win.woff2 │ ├── Source-Sans-Pro-greek-ext-mac.woff2 │ ├── Source-Sans-Pro-greek-ext-win.woff2 │ ├── Source-Sans-Pro-latin-ext-mac.woff2 │ ├── Source-Sans-Pro-latin-ext-win.woff2 │ ├── Source-Sans-Pro-greek-bold-mac.woff2 │ ├── Source-Sans-Pro-greek-bold-win.woff2 │ ├── Source-Sans-Pro-latin-bold-mac.woff2 │ ├── Source-Sans-Pro-latin-bold-win.woff2 │ ├── Source-Sans-Pro-vietnamese-mac.woff2 │ ├── Source-Sans-Pro-vietnamese-win.woff2 │ ├── Source-Sans-Pro-cycrillic-bold-mac.woff2 │ ├── Source-Sans-Pro-cycrillic-bold-win.woff2 │ ├── Source-Sans-Pro-cycrillic-ext-mac.woff2 │ ├── Source-Sans-Pro-cycrillic-ext-win.woff2 │ ├── Source-Sans-Pro-greek-ext-bold-mac.woff2 │ ├── Source-Sans-Pro-greek-ext-bold-win.woff2 │ ├── Source-Sans-Pro-latin-ext-bold-mac.woff2 │ ├── Source-Sans-Pro-latin-ext-bold-win.woff2 │ ├── Source-Sans-Pro-greek-semi-bold-mac.woff2 │ ├── Source-Sans-Pro-greek-semi-bold-win.woff2 │ ├── Source-Sans-Pro-latin-semi-bold-mac.woff2 │ ├── Source-Sans-Pro-latin-semi-bold-win.woff2 │ ├── Source-Sans-Pro-vietnamese-bold-mac.woff2 │ ├── Source-Sans-Pro-vietnamese-bold-win.woff2 │ ├── Source-Sans-Pro-cycrillic-ext-bold-mac.woff2 │ ├── Source-Sans-Pro-cycrillic-ext-bold-win.woff2 │ ├── Source-Sans-Pro-cycrillic-semi-bold-mac.woff2 │ ├── Source-Sans-Pro-cycrillic-semi-bold-win.woff2 │ ├── Source-Sans-Pro-greek-ext-semi-bold-mac.woff2 │ ├── Source-Sans-Pro-greek-ext-semi-bold-win.woff2 │ ├── Source-Sans-Pro-latin-ext-semi-bold-mac.woff2 │ ├── Source-Sans-Pro-latin-ext-semi-bold-win.woff2 │ ├── Source-Sans-Pro-vietnamese-semi-bold-mac.woff2 │ ├── Source-Sans-Pro-vietnamese-semi-bold-win.woff2 │ ├── Source-Sans-Pro-cycrillic-ext-semi-bold-mac.woff2 │ └── Source-Sans-Pro-cycrillic-ext-semi-bold-win.woff2 ├── .gitattributes ├── .devcontainer └── devcontainer.json ├── src ├── common │ ├── extensioni18nManager.js │ ├── extension-init.js │ ├── calculateTextScore.js │ ├── loadFonts.js │ ├── eventBus.js │ ├── i18nManager.js │ ├── tracker.js │ ├── localStorageWrapper.js │ ├── dictionary.js │ ├── stringMap.js │ ├── textStatistics.js │ └── textToSpeech.js ├── content │ ├── validationStatus.js │ ├── debounce.js │ ├── domWalker.js │ └── extension-main.js ├── validator │ ├── loadValidator.js │ └── validator.html ├── components │ ├── hint │ │ └── hint.js │ ├── select │ │ └── select.js │ ├── icon │ │ └── icon.js │ ├── toggle │ │ └── toggle.js │ ├── score │ │ └── score.js │ └── menu │ │ └── menu.js ├── teaser │ └── rating │ │ └── rating.html ├── background.js ├── managed_settings.json ├── popup │ └── reloadContentScriptsIfNecessary.js ├── config │ └── config.js └── polyfills │ └── custom.js ├── test └── _import.js ├── _import.js ├── .github ├── dependabot.yml └── workflows │ └── main.yml ├── .gitignore ├── package.json └── PRIVACY.md /src-packed/settings.js: -------------------------------------------------------------------------------- 1 | export var isTests = false; 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "appinsights" 4 | ] 5 | } -------------------------------------------------------------------------------- /docs/openai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/openai.png -------------------------------------------------------------------------------- /docs/popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/popup.png -------------------------------------------------------------------------------- /inclusive.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": {} 8 | } -------------------------------------------------------------------------------- /store/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/store/icon.png -------------------------------------------------------------------------------- /assets/model.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/model.onnx -------------------------------------------------------------------------------- /docs/artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/artifacts.png -------------------------------------------------------------------------------- /docs/openaifirst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/openaifirst.png -------------------------------------------------------------------------------- /store/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/store/screenshot.png -------------------------------------------------------------------------------- /docs/negative-word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/negative-word.png -------------------------------------------------------------------------------- /assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/favicon.ico -------------------------------------------------------------------------------- /assets/images/lt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/lt-logo.png -------------------------------------------------------------------------------- /docs/debugging-tests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/debugging-tests.png -------------------------------------------------------------------------------- /assets/images/errors/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/1.png -------------------------------------------------------------------------------- /assets/images/errors/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/2.png -------------------------------------------------------------------------------- /assets/images/errors/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/3.png -------------------------------------------------------------------------------- /assets/images/errors/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/4.png -------------------------------------------------------------------------------- /assets/images/errors/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/5.png -------------------------------------------------------------------------------- /assets/images/errors/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/6.png -------------------------------------------------------------------------------- /assets/images/errors/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/7.png -------------------------------------------------------------------------------- /assets/images/errors/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/8.png -------------------------------------------------------------------------------- /assets/images/errors/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/9.png -------------------------------------------------------------------------------- /assets/images/hint-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/hint-arrow.png -------------------------------------------------------------------------------- /assets/images/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/progress.gif -------------------------------------------------------------------------------- /docs/negative-sentiment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/negative-sentiment.png -------------------------------------------------------------------------------- /docs/negative-word-fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/negative-word-fixed.png -------------------------------------------------------------------------------- /assets/images/icons/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon16.png -------------------------------------------------------------------------------- /assets/images/icons/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon32.png -------------------------------------------------------------------------------- /assets/images/icons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon48.png -------------------------------------------------------------------------------- /assets/images/icons/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon64.png -------------------------------------------------------------------------------- /assets/images/progress_2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/progress_2x.gif -------------------------------------------------------------------------------- /assets/images/icons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon128.png -------------------------------------------------------------------------------- /docs/negative-sentiment-fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/docs/negative-sentiment-fixed.png -------------------------------------------------------------------------------- /assets/images/errors/1_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/1_premium.png -------------------------------------------------------------------------------- /assets/images/errors/2_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/2_premium.png -------------------------------------------------------------------------------- /assets/images/errors/3_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/3_premium.png -------------------------------------------------------------------------------- /assets/images/errors/4_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/4_premium.png -------------------------------------------------------------------------------- /assets/images/errors/5_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/5_premium.png -------------------------------------------------------------------------------- /assets/images/errors/6_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/6_premium.png -------------------------------------------------------------------------------- /assets/images/errors/7_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/7_premium.png -------------------------------------------------------------------------------- /assets/images/errors/8_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/8_premium.png -------------------------------------------------------------------------------- /assets/images/errors/9_premium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/errors/9_premium.png -------------------------------------------------------------------------------- /assets/images/lt-favicon-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/lt-favicon-color.png -------------------------------------------------------------------------------- /assets/images/lt-favicon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/lt-favicon-white.png -------------------------------------------------------------------------------- /assets/images/dialog_scroll_hint.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/dialog_scroll_hint.gif -------------------------------------------------------------------------------- /assets/images/icons/icon128_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon128_white.png -------------------------------------------------------------------------------- /assets/images/icons/icon16_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon16_white.png -------------------------------------------------------------------------------- /assets/images/icons/icon32_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon32_white.png -------------------------------------------------------------------------------- /assets/images/icons/icon48_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon48_white.png -------------------------------------------------------------------------------- /assets/images/icons/icon64_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/icons/icon64_white.png -------------------------------------------------------------------------------- /assets/images/openthesaurus_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/openthesaurus_logo.png -------------------------------------------------------------------------------- /assets/images/redesign/icon_read.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/redesign/icon_read.gif -------------------------------------------------------------------------------- /assets/fonts/Roboto-Mono-latin-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Roboto-Mono-latin-bold.woff2 -------------------------------------------------------------------------------- /assets/images/messages/message_turn_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/messages/message_turn_on.gif -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | *.js text 4 | *.html text 5 | *.css text 6 | *.md text 7 | *.json text 8 | -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-ext-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-ext-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-ext-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-ext-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-ext-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-ext-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-ext-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-ext-win.woff2 -------------------------------------------------------------------------------- /assets/images/README.md: -------------------------------------------------------------------------------- 1 | # Attribution 2 | 3 | The logo is from: 4 | 5 | https://thenounproject.com/search/?q=heart&i=1966522 6 | 7 | Heart by Alice Design from the Noun Project -------------------------------------------------------------------------------- /assets/images/lt-favicon-color_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/lt-favicon-color_notification.png -------------------------------------------------------------------------------- /assets/images/lt-favicon-white_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/lt-favicon-white_notification.png -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-vietnamese-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-vietnamese-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-vietnamese-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-vietnamese-win.woff2 -------------------------------------------------------------------------------- /assets/images/messages/message_turn_on_safari.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/images/messages/message_turn_on_safari.gif -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-ext-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-ext-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-ext-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-ext-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-ext-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-ext-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-ext-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-ext-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-ext-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-ext-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-ext-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-ext-bold-win.woff2 -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "hostRequirements": { 3 | "cpus": 2, 4 | "memory": "8gb", 5 | "storage": "64gb" 6 | }, 7 | "features": { 8 | } 9 | } -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-semi-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-semi-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-vietnamese-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-vietnamese-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-vietnamese-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-vietnamese-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-ext-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-ext-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-ext-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-ext-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-semi-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-ext-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-ext-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-greek-ext-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-greek-ext-semi-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-ext-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-ext-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-latin-ext-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-latin-ext-semi-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-vietnamese-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-vietnamese-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-vietnamese-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-vietnamese-semi-bold-win.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-ext-semi-bold-mac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-ext-semi-bold-mac.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Sans-Pro-cycrillic-ext-semi-bold-win.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonathanpeppers/inclusive-code-reviews-browser/HEAD/assets/fonts/Source-Sans-Pro-cycrillic-ext-semi-bold-win.woff2 -------------------------------------------------------------------------------- /src/common/extensioni18nManager.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class Extensioni18nManager extends i18nManagerClass{addEventListener(e,s){}setLocale(e){}getMessage(e,s){return chrome.i18n.getMessage(e,s)}} -------------------------------------------------------------------------------- /src/common/extension-init.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | i18nManager.init(new Extensioni18nManager),StorageController.init(()=>new ExtensionStorageController),EnvironmentAdapter.init(new ExtensionEnvironmentAdapter); -------------------------------------------------------------------------------- /assets/images/flags/de-de.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_pause.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/calculateTextScore.js: -------------------------------------------------------------------------------- 1 | class TextScore{calculateTextScore(r,o,t,c){if(r<100)return 0;let e=0,a=0,l=0;const s=r=>{r.isSpellingError?l++:r.isStyleError?a++:e++};o.forEach(s),t.forEach(s),c.forEach(s);const f=3*e+4*l+2*a;return Math.max(0,Math.floor((r-f)/r*100))}} -------------------------------------------------------------------------------- /assets/images/flags/pl-pl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/flags/da-dk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/common/loadFonts.js: -------------------------------------------------------------------------------- 1 | {const t=document.createElement("style");let n="-win";navigator.userAgent.includes("Mac OS")&&(n="-mac"),t.textContent=`\n\tbody,\n\ttextarea,\n\tbutton,\n\tinput,\n\tselect {\n\t\tfont-family: 'LanguageTool${n}', sans-serif;\n\t}\n\t`,document.head.appendChild(t)} -------------------------------------------------------------------------------- /assets/images/flags/uk-ua.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/de-at.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/_import.js: -------------------------------------------------------------------------------- 1 | // I found this was required for `npx xt-test` to compile at all 2 | import regeneratorRuntime from "regenerator-runtime"; 3 | 4 | // Comment out if you want console output during test runs 5 | console.log = () => { } 6 | 7 | // Seed for OpenAI 8 | globalThis.OpenAISeed = 1234; 9 | -------------------------------------------------------------------------------- /assets/images/flags/ca-es.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/close_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/ca-es-valencia.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/beta-test.md: -------------------------------------------------------------------------------- 1 | # Beta Test 2 | 3 | If you are a member of Microsoft's Developer Division, you can find 4 | the instructions on the [Azure DevOps Wiki][0] for testing out this 5 | extension. Thanks! 6 | 7 | [0]: https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/27882/Browser-Extension?anchor=beta-test 8 | -------------------------------------------------------------------------------- /src-packed/README.md: -------------------------------------------------------------------------------- 1 | # What is `src-packed`? 2 | 3 | Files here are packed into a single `packed.js` via `package.json`: 4 | 5 | ```json 6 | "xtbuild": { 7 | "js_bundles": [ 8 | { 9 | "name": "packed", 10 | "src": "./src-packed/*.js" 11 | } 12 | ], 13 | } 14 | ``` 15 | -------------------------------------------------------------------------------- /assets/images/flags/fr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/ga-ie.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/flags/it.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/ru-ru.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/ro-ro.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/br-fr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/de-ch.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /assets/images/new_window_orange.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/new_window_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/no.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/eventBus.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class EventBus{constructor(){this._eventHandlers=new Map}subscribe(e,s){this._eventHandlers.has(e)||this._eventHandlers.set(e,[]),this._eventHandlers.get(e).push(s)}fire(e,s){const t=this._eventHandlers.get(e);t&&t.forEach(e=>{try{e(s)}catch(e){console.error(e)}})}destroy(){this._eventHandlers=new Map}} -------------------------------------------------------------------------------- /assets/images/managed_login_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/images/flags/nl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/common/i18nManager.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class i18nManagerClass{}i18nManagerClass.eventNames={localeChanged:"lt-i18nManager.localeChanged"};const i18nManager=class{static init(e){this._instance=e}static addEventListener(e,a){this._instance.addEventListener(e,a)}static setLocale(e){this._instance.setLocale(e)}static getMessage(e,a){return this._instance.getMessage(e,a)}}; -------------------------------------------------------------------------------- /assets/images/flags/eo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_placement_dialog.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/toolbar_permission_required.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_placement_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_placement_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/turnoff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_ignore.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_picky.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/ja-jp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_binocular.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Run tests", 9 | "type": "node", 10 | "request": "launch", 11 | "cwd": "${workspaceFolder}", 12 | "runtimeExecutable": "npx", 13 | "runtimeArgs": ["xt-test"] 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /_import.js: -------------------------------------------------------------------------------- 1 | // Fix webpack publicPath auto-detection issue in browser extension context 2 | // This must be set before any webpack imports to prevent "Automatic publicPath is not supported in this browser" error 3 | __webpack_public_path__ = './'; 4 | 5 | import * as ort from 'onnxruntime-web'; 6 | globalThis.ort = ort; 7 | 8 | // Use a CDN for the WebAssembly binaries, see: 9 | // * https://onnxruntime.ai/docs/tutorials/web/deploy.html#webassembly-binaries 10 | // * https://www.jsdelivr.com/ 11 | ort.env.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/'; 12 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_menu-check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: "npm" 7 | directory: "/" # Location of package manifests 8 | schedule: 9 | interval: "weekly" 10 | ignore: 11 | # Keep webpack and onnxruntime packages at specific versions for compatibility 12 | - dependency-name: "webpack" 13 | - dependency-name: "onnxruntime-web" 14 | - dependency-name: "onnxruntime-node" 15 | -------------------------------------------------------------------------------- /assets/images/expand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/content/validationStatus.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | var VALIDATION_STATUS; 3 | !(function (T) { 4 | (T.PERMISSION_REQUIRED = "PERMISSION_REQUIRED"), 5 | (T.DISABLED = "DISABLED"), 6 | (T.DISCONNECTED = "DISCONNECTED"), 7 | (T.TEXT_TOO_SHORT = "TEXT_TOO_SHORT"), 8 | (T.TEXT_TOO_LONG = "TEXT_TOO_LONG"), 9 | (T.IN_PROGRESS = "IN_PROGRESS"), 10 | (T.COMPLETED = "COMPLETED"), 11 | (T.UNSUPPORTED_LANGUAGE = "UNSUPPORTED_LANGUAGE"), 12 | (T.FAILED = "FAILED"); 13 | })(VALIDATION_STATUS || (VALIDATION_STATUS = {})); 14 | -------------------------------------------------------------------------------- /assets/images/done.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_info.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/en-us.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_read.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/images/flags/en-ca.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/icon_speak.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/flags/sv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/common/tracker.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class Tracker { 3 | static trackPageView(e) { 4 | // Do nothing 5 | } 6 | static trackDisabledRule(e, r, t, a) { 7 | // Do nothing 8 | } 9 | static trackDictionaryEvent(e, r, t = !1) { 10 | // Do nothing 11 | } 12 | static trackEvent(e, r, t, a) { 13 | // Do nothing 14 | } 15 | static trackInstall() { 16 | // Do nothing 17 | } 18 | static trackActivity() { 19 | // Do nothing 20 | } 21 | static trackError(e, r, t = "") { 22 | // Do nothing 23 | } 24 | static trackStat(e, r) { 25 | // Do nothing 26 | } 27 | static trackTextLength(e) { 28 | // Do nothing 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /assets/images/flags/zh-cn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /assets/images/dictionary.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_picky-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/content/debounce.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class Debounce{constructor(l,i=250,t=0){this.callImmediately=(()=>{this._args&&this._wrappedFunc(...this._args),this.cancelCall()}),this._wrappedFunc=l,this._delay=i,this._maxDelay=t,this._args=null,this._delayTimeoutId=null,this._maxDelayTimeoutId=null}call(...l){this.cancelCall(!0),this._args=l,this._delayTimeoutId=window.setTimeout(this.callImmediately,this._delay),this._maxDelay>0&&null===this._maxDelayTimeoutId&&(this._maxDelayTimeoutId=window.setTimeout(this.callImmediately,this._maxDelay))}cancelCall(l=!1){this._args=null,null!==this._delayTimeoutId&&(window.clearTimeout(this._delayTimeoutId),this._delayTimeoutId=null),l||null===this._maxDelayTimeoutId||(window.clearTimeout(this._maxDelayTimeoutId),this._maxDelayTimeoutId=null)}} -------------------------------------------------------------------------------- /assets/images/errors/1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/errors/1_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/blocked.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/common/localStorageWrapper.js: -------------------------------------------------------------------------------- 1 | class LocalStorageWrapper{static set(t,e){let r=this.get(this.ROOT_KEY)||[];const s=r.findIndex(e=>e.key===t);for(s>-1&&r.splice(s,1),r.push({key:t,value:e});JSON.stringify(r).length>this.MAX_BYTE_SIZE;)r.shift();try{localStorage.setItem(this.ROOT_KEY,JSON.stringify(r))}catch(t){}}static get(t){try{const e=localStorage.getItem(this.ROOT_KEY),r=e?JSON.parse(e):null;if(!r)return null;const s=r.find(e=>e.key===t);return s&&s.value?s.value:null}catch(t){return null}}static getAll(){try{const t=localStorage.getItem(this.ROOT_KEY),e=t?JSON.parse(t):null;return e||[]}catch(t){return[]}}static remove(t){let e=this.get(this.ROOT_KEY)||[];const r=e.findIndex(e=>e.key===t);if(r>-1){e.splice(r,1);try{localStorage.setItem(this.ROOT_KEY,JSON.stringify(e))}catch(t){}}}}LocalStorageWrapper.ROOT_KEY="__lt_host_storage",LocalStorageWrapper.MAX_BYTE_SIZE=1048576; -------------------------------------------------------------------------------- /assets/images/disabled_domains.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/en-gb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/validator/loadValidator.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | { 3 | const e = (window.chrome || window.browser).runtime; 4 | (e.getManifest().content_scripts || []).forEach((t) => { 5 | t.js && 6 | t.all_frames && 7 | t.js.forEach((t) => { 8 | const c = document.createElement("script"); 9 | (c.src = e.getURL(t)), document.write(c.outerHTML); 10 | }), 11 | t.css && 12 | t.css.forEach((t) => { 13 | const c = document.createElement("link"); 14 | (c.rel = "stylesheet"), (c.href = e.getURL(t)), document.head.appendChild(c); 15 | }); 16 | }); 17 | const t = document.createElement("script"); 18 | (t.src = "./validator.js"), document.write(t.outerHTML); 19 | } 20 | -------------------------------------------------------------------------------- /assets/images/upgrade_bg_orange.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | background 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/images/addphrase.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon/plus 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icon/check 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/improve-heuristics.md: -------------------------------------------------------------------------------- 1 | # Report sentence to improve heuristics 2 | 3 | If you are investigating an issue like: 4 | 5 | https://github.com/jonathanpeppers/inclusive-code-reviews-browser/issues/137 6 | 7 | To solve this: 8 | 9 | 1. Test `main`, does it still happen there? If not, you might be able 10 | to close -- as our custom machine learning model may have fixed it. 11 | 12 | 2. If the problem still occurs, try the same phrase in our ML tests: 13 | 14 | https://github.com/jonathanpeppers/inclusive-code-reviews-ml/blob/main/onnxjs/tests/test_cases.json 15 | 16 | 3. If it still fails there, add a *similar* phrase (not verbatim!) to: 17 | 18 | https://github.com/jonathanpeppers/inclusive-code-reviews-ml/blob/main/comments/classified.csv 19 | 20 | 4. Update the model as described here: 21 | 22 | https://github.com/jonathanpeppers/inclusive-code-reviews-ml#updating-the-model 23 | -------------------------------------------------------------------------------- /assets/images/add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_disable.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/hint/hint.js: -------------------------------------------------------------------------------- 1 | class Hint{constructor(t,e,s,i,n,l){this._className=t,this._type=e,this._headline=s,this._description=i,this._position=n,this._parentElement=l,this._document=l.ownerDocument,this._render()}_render(){this._element=this._document.createElement("lt-div"),this._element.classList.add("lt-hint","lt-position--"+this._position,"lt-hint--"+this._type),this._className&&this._element.classList.add("lt-hint--"+this._className);const t=document.createElement("lt-div");t.className="lt-hint__headline",t.textContent=this._headline,this._element.appendChild(t);const e=document.createElement("lt-div");e.className="lt-hint__text",e.textContent=this._description,this._element.appendChild(e),this._close=document.createElement("lt-span"),this._close.className="lt-hint__close",this._element.appendChild(this._close),this._parentElement.appendChild(this._element)}getElement(){return this._element}getClose(){return this._close}} -------------------------------------------------------------------------------- /assets/images/lt-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/top.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icons/top 5 | Created with Sketch. 6 | 11 | -------------------------------------------------------------------------------- /assets/images/lt-logo_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icons/down 5 | Created with Sketch. 6 | 11 | -------------------------------------------------------------------------------- /assets/images/flags/en-za.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/azure-text-analytics.md: -------------------------------------------------------------------------------- 1 | # Azure Text Analytics 2 | 3 | In past versions of this extension, your comments were sent to 4 | [Azure Text Analytics][text-analytics] for sentiment analysis. No text 5 | is stored anywhere, at any time. 6 | 7 | For example, you might make a comment on a Github pull request. Seems 8 | OK, right? Is it a "mean" comment? 9 | 10 | ![negative sentiment](docs/negative-sentiment.png) 11 | 12 | We could certainly reword this be be better -- more inclusive and 13 | generally friendlier: 14 | 15 | ![negative sentiment fixed](docs/negative-sentiment-fixed.png) 16 | 17 | [text-analytics]: https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/overview 18 | 19 | ## Links & Docs 20 | 21 | * [Documentation][text-analytics] 22 | * [npm package](https://www.npmjs.com/package/@azure/ai-text-analytics/v/5.1.0) 23 | * [API Test Console](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Sentiment/console) 24 | -------------------------------------------------------------------------------- /src/teaser/rating/rating.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /assets/images/opera_store.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/upgrade_bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /assets/images/flags/el-gr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/components/select/select.js: -------------------------------------------------------------------------------- 1 | class Select{constructor(e,t,s){this._className=e,this._parentElement=t,this._select=s,this._document=t.ownerDocument,this._currentSelection=this._document.createElement("lt-span"),this._render()}_render(){const e=this._document.createElement("lt-div");e.classList.add("lt-dialog__selector-wrapper","lt-dialog__selector-wrapper--"+this._className),this._parentElement.appendChild(e),this._currentSelection.classList.add("lt-dialog__current-selection","lt-dialog__current-selection--"+this._className),e.appendChild(this._currentSelection),this._select.classList.add("lt-dialog__selector","lt-dialog__selector--"+this._className),e.appendChild(this._select)}setActive(e,t,s){this._currentSelection.textContent=e||"",this._select.value=t,new DomMeasurement(this._document).setStyles(this._currentSelection,s)}addOption(e){this._select.prepend(e)}updateOptionLable(e,t){this._select.querySelectorAll("option[value="+e+"]")[0].textContent=t}getSelect(){return this._select}getValue(){return this._select.value}} -------------------------------------------------------------------------------- /assets/images/text_too_long.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/errors/4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/edit_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/errors/4_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/close-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/errors/7.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/errors/7_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/components/icon/icon.js: -------------------------------------------------------------------------------- 1 | class Icon{constructor(t,e,i,s){this._className=t,this._label=e,this._parentElement=s,this._toolTip=i,this._document=s.ownerDocument,this._render()}_render(){if(this._element=this._document.createElement("lt-div"),this._element.classList.add("lt-icon","lt-icon--clickable","lt-icon--"+this._className),this._element.setAttribute("data-lt-prevent-focus",""),this._parentElement.appendChild(this._element),this._icon=this._document.createElement("lt-span"),this._icon.classList.add("lt-icon__icon","lt-icon__icon--"+this._className),this._element.appendChild(this._icon),this._toolTip){const t=this._document.createElement("lt-div");t.classList.add("lt-icon__tooltip","lt-icon__tooltip--"+this._toolTip.position,"lt-icon__tooltip--"+this._className),t.textContent=this._toolTip.label,this._element.appendChild(t)}if(this._label){const t=this._document.createElement("lt-span");t.classList.add("lt-icon__label"),t.textContent=this._label,this._element.appendChild(t)}}setIcon(t){this._icon.className="",this._icon.classList.add("lt-icon__icon","lt-icon__icon--"+t)}getElement(){return this._element}} -------------------------------------------------------------------------------- /src/common/dictionary.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class Dictionary{static _update(t){return this._storageController.updateSettings({dictionary:t})}static init(t,r=[]){this._isInitialized||(this._storageController=t||StorageController.create(),this._defaultWords=r,this._isInitialized=!0)}static get(){let t=this._storageController.getSettings().dictionary||[];return Array.isArray(t)||(t=[]),t=t.concat(this._defaultWords),t=uniq(t)}static getSorted(){return this.get().sort((t,r)=>t.toLowerCase().localeCompare(r.toLowerCase()))}static add(t){const r=this.get();return r.push(t.trim()),EnvironmentAdapter.addWordToDictionary(t),this._update(r)}static addBatch(t){const r=this.get();return t.forEach(t=>{t&&t.trim()&&!t.trim().match(/\s/)&&r.push(t.trim())}),EnvironmentAdapter.addWordsToDictionary(t),this._update(r)}static remove(t){const r=this.get(),i=r.indexOf(t);return-1===i?Promise.resolve():(r.splice(i,1),EnvironmentAdapter.removeWordFromDictionary(t),this._update(r))}static clear(){return EnvironmentAdapter.clearDictionary(),this._update([])}}Dictionary._isInitialized=!1; -------------------------------------------------------------------------------- /src/background.js: -------------------------------------------------------------------------------- 1 | console.log('service worker loaded'); 2 | 3 | // HACK: workaround for onnxruntime-web 4 | // background.js:7 ReferenceError: document is not defined 5 | // at packed.js:2:623031 6 | // at packed.js:2:623265 7 | // at background.js:5:5 8 | if (typeof document === 'undefined') 9 | document = { }; 10 | 11 | // These were the order of V2 background.scripts 12 | try { 13 | importScripts("packed.js", "config/config.js", "common/browserDetector.js", "common/utils.js", "common/eventBus.js", "common/messages.js", "common/i18nManager.js", "common/extensioni18nManager.js", "common/languageManager.js", "common/storageController.js", "common/extensionStorageController.js", "common/environmentAdapter.js", "common/extensionEnvironmentAdapter.js", "common/extension-init.js", "common/tracker.js", "background/graphemeSplitter.js", "background/validator.js", "background/dictionarySync.js", "background/synonyms.js", "background/extension-main.js"); 14 | } catch (e) { 15 | console.error(e); 16 | } 17 | 18 | addEventListener('activate', () => { 19 | console.log('service worker activated'); 20 | }); 21 | -------------------------------------------------------------------------------- /assets/images/upgrade_check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | upgrade_check 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_feedback.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_options.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/ta-in.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /assets/images/flags/sk-sk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/common/stringMap.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class StringMap{constructor(h,t=StringMap.DEFAULT_CHUNK_SIZE){this._length=h.length,this._chars=h.split(""),this._chunkSize=t,this._cachedChunks=new Array(Math.ceil(this._length/this._chunkSize)).fill(""),this._value=h}_updateCachedChunks(){for(let h=0;h src-packed/secrets.js 26 | 27 | - name: npm install 28 | run: npm install 29 | 30 | - name: build extension 31 | run: npx xt-build 32 | 33 | - name: run tests 34 | run: npx xt-test 35 | 36 | # Upload unzipped artifact content to avoid creating a nested .zip artifact 37 | - name: unzip release.zip 38 | run: unzip release.zip -d unzipped-release 39 | 40 | - name: archive release.zip 41 | uses: actions/upload-artifact@v4 42 | with: 43 | name: release 44 | path: unzipped-release 45 | if-no-files-found: error 46 | -------------------------------------------------------------------------------- /src/common/textStatistics.js: -------------------------------------------------------------------------------- 1 | class TextStatistics{constructor(t){this._allWords=null,this._allSentences=null,this._text=t,this._normalizedText=this.normalizeText(t)}updateText(t){this._text=t,this._normalizedText=this.normalizeText(t),this._allSentences=null,this._allWords=null}normalizeText(t){return t=(t=(t=(t=t.replace(/([a-zèéêáàâ0-9])['’`´‘]([a-z])/gi,"$1$2")).replace(/[\-_–"“”„'’`´‘˚^°\+\*\.\!\?…\:,;=\)\(\[\]%¡¿‽#<>•\/]/g," ")).replace(/\s+/g," ")).replace(/(^\s*)|(\s*$)/g,"")}getAllWords(){return this._normalizedText?(this._allWords||(this._allWords=this._normalizedText.replace(/([0-9])[\.,]([0-9])/g,"$1$2").split(/\s/)),this._allWords):[]}countWords(){return this.getAllWords().length}countUniqueWords(){const t=this.getAllWords();return uniq(t).length}getAllSentences(){if(!this._allSentences){const t=this._text.trim().replace(/([^\.\!\…\?\n])(\n+)([\-–]?\s*)([A-ZÄÖÜÀÁÂÈÉÊÌÍÎÒÓÔÙÚÛ0-9])/g,"$1. $3$4").replace(/\n\n\s*/g," ");this._allSentences=window.tokenizer.sentences(t)}return this._allSentences||[]}countSentences(){return this.getAllSentences().length}getReadingTime(){return Math.round(this.countWords()/200)}getSpeakingTime(){return Math.round(this.countWords()/130)}countCharacters(){return this._text.trim().length}uniq(t){const e=[];return t.forEach(t=>{-1===e.indexOf(t)&&e.push(t)}),e}} -------------------------------------------------------------------------------- /assets/images/flags/not_found.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/info_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icon/info 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/validator_has_errors.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/dialog_no_errors.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/flags/en-au.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/components/toggle/toggle.js: -------------------------------------------------------------------------------- 1 | class Toggle{constructor(t,e,l,s){this._className=t,this._label=e,this._info=l,this._parentElement=s,this._document=s.ownerDocument,this._render()}_render(){this._element=this._document.createElement("lt-div"),this._element.setAttribute("data-lt-prevent-focus",""),this._element.classList.add("lt-toggle-item","lt-toggle--"+this._className),this._parentElement.appendChild(this._element);const t=this._document.createElement("lt-div");t.classList.add("lt-toggle-item__title","lt-toggle-item__title--"+this._className);const e=this._document.createElement("lt-span");e.classList.add("lt-toggle-item__title__label"),e.textContent=this._label,t.appendChild(e),this._info&&(this._infoElement=this._document.createElement("lt-span"),this._infoElement.classList.add("lt-toggle-item__title__info"),this._infoElement.textContent=this._info,t.appendChild(this._infoElement)),this._element.appendChild(t);const l=this._document.createElement("lt-div");l.classList.add("lt-toggle-item__toggle","lt-toggle-item__toggle--"+this._className),this._element.appendChild(l);const s=this._document.createElement("lt-div");s.classList.add("lt-toggle-item__toggle__dot"),l.appendChild(s)}set(t){t?this._element.classList.add("lt-toggle-item---checked"):this._element.classList.remove("lt-toggle-item---checked")}setInfo(t){this._infoElement.textContent=t}getElement(){return this._element}} -------------------------------------------------------------------------------- /assets/images/flags/eu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /assets/images/redesign/icon_help.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/managed_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "loginUrl": { 5 | "title": "Login URL", 6 | "description": "LanguageTool Enterprise supports OpenID/ADFS/oAuth-managed logins. Usually requires apiServerUrl to be also set. Defaults to LanguageTool's own login server. Contact support@languagetoolplus.com for more information.", 7 | "type": "string" 8 | }, 9 | "apiServerUrl": { 10 | "title": "Custom Server URL", 11 | "description": "Check texts against your own LanguageTool server. Defaults to LanguageTool's own login server. Contact support@languagetoolplus.com for more information.", 12 | "type": "string" 13 | }, 14 | "disablePrivacyConfirmation": { 15 | "title": "Hide privacy confirmation dialog", 16 | "description": "Set this to 'true' if your users should not see the privacy confirmation dialog during installation. Defaults to 'false'.", 17 | "type": "boolean" 18 | }, 19 | "disablePersonalDictionary": { 20 | "title": "Disable Personal Dictionary", 21 | "description": "Set this to 'true' if you do not want your users to be able to add words to their dictionary. Defaults to 'false'.", 22 | "type": "boolean" 23 | }, 24 | "disableIgnoredRules": { 25 | "title": "Disable Ignored Rules", 26 | "description": "Set this to 'true' if you do not want your users to be able to ignore grammar rules. Defaults to 'false'.", 27 | "type": "boolean" 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/components/score/score.js: -------------------------------------------------------------------------------- 1 | class Score{constructor(t,e,s){this._className=t,this._parentElement=e,this._toolTip=s,this._document=e.ownerDocument,this._render()}_render(){this._element=this._document.createElement("lt-div"),this._element.classList.add("lt-score","lt-score--"+this._className),this._element.setAttribute("data-lt-prevent-focus",""),this._parentElement.appendChild(this._element),this._progressLabel=this._document.createElement("lt-span"),this._progressLabel.classList.add("lt-score__label"),this._progressLabel.setAttribute("data-lt-prevent-focus",""),this._progressLabel.textContent="0";const t=this._document.createElement("lt-div");t.classList.add("lt-icon__tooltip","lt-icon__tooltip--"+this._toolTip.position,"lt-icon__tooltip--"+this._className),t.textContent=this._toolTip.label,this._element.appendChild(t),this._element.appendChild(this._progressLabel)}setScore(t){Math.PI;t>0?(this._progressLabel.textContent=t.toString(),this._updateProgress(t),this._element.classList.remove("lt-score--hidden")):this._element.classList.add("lt-score--hidden")}_updateProgress(t){let e="",s="";if(t<50){e="linear-gradient(90deg, #DEE3ED 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0))",s="linear-gradient("+(90+3.6*t)+"deg, #1976F0 50%, #DEE3ED 50%, #DEE3ED)"}else{e="linear-gradient("+(3.6*(t-50)-90)+"deg, #1976F0 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0))",s="linear-gradient(270deg, #1976F0 50%, #DEE3ED 50%, #DEE3ED)"}this._element.setAttribute("style","background-image: "+e+", "+s+" !important")}} -------------------------------------------------------------------------------- /src/validator/validator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | LanguageTool 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 24 |
25 |
26 |
27 |

28 |

29 |
30 |
32 |
33 |
34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /assets/images/flags/tl-ph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # parcel-bundler cache (https://parceljs.org/) 61 | .cache 62 | 63 | # next.js build output 64 | .next 65 | 66 | # nuxt.js build output 67 | .nuxt 68 | 69 | # vuepress build output 70 | .vuepress/dist 71 | 72 | # Serverless directories 73 | .serverless 74 | 75 | # FuseBox cache 76 | .fusebox/ 77 | 78 | # Build output 79 | dist/ 80 | release.zip 81 | 82 | # Secrets we don't commit 83 | secrets.js 84 | -------------------------------------------------------------------------------- /assets/images/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icon/settings 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/enable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/pt-ao.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /assets/images/google_docs_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /assets/images/errors/2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/errors/2_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icons/star 5 | Created with Sketch. 6 | 11 | -------------------------------------------------------------------------------- /assets/images/settings_box_bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Box/WelcomeBackground 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /assets/images/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icon/add 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /assets/images/errors/5.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/popup/reloadContentScriptsIfNecessary.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | let isMessageListenerSet = !1; 3 | function reloadContentScriptsIfNecessary(e, t) { 4 | isMessageListenerSet || 5 | ((isMessageListenerSet = !0), 6 | chrome.runtime.onMessage.addListener((s, a) => { 7 | if (s && "INJECT_SCRIPTS" === s.command) { 8 | (chrome.runtime.getManifest().content_scripts || []).forEach((t) => { 9 | t.js && 10 | t.js.forEach((t) => { 11 | chrome.scripting.executeScript(e, { files: [ "/" + t ], matchAboutBlank: !0, allFrames: !1, frameId: a.frameId }).catch((e) => console.error(e.message)); 12 | }), 13 | t.css && 14 | t.css.forEach((t) => { 15 | chrome.tabs.insertCSS(e, { file: "/" + t, matchAboutBlank: !0, allFrames: !1, frameId: a.frameId }).catch((e) => console.error(e.message)); 16 | }); 17 | }), 18 | Tracker.trackEvent("Action", "inject_scripts", t); 19 | } 20 | })), 21 | chrome.scripting 22 | .executeScript(e, { 23 | func: inject, 24 | matchAboutBlank: !0, 25 | allFrames: !0, 26 | }) 27 | .catch(() => null); 28 | } 29 | 30 | function inject() { 31 | if (typeof(LTAssistant) === "undefined" && navigator.userAgent.match(/Chrome\/|Chromium\//) && !location.pathname.includes('_generated_background_page')) { 32 | window.__ltLastActiveElement = document.activeElement; 33 | chrome.runtime.sendMessage({ command: "INJECT_SCRIPTS" }, () => null); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /assets/images/errors/5_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/common/textToSpeech.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | class TextToSpeech{static _contructor(){this._isInitialized||(this._isPlaying=!1,this._isInitialized=!0)}static supportsLanguage(e){return["de","en","es","fr","it","nl","pl","pt","ru"].includes(e.toLowerCase().substr(0,2))}static supportsWord(e){return!["languagetool"].includes(e.toLowerCase())}static _getVoices(e){this.isSupported()&&(window.speechSynthesis.getVoices().length?e(window.speechSynthesis.getVoices()):speechSynthesis.onvoiceschanged=function(){e(window.speechSynthesis.getVoices())})}static _findVoice(e,t){let s=t.toLowerCase();"en-au"!==s&&"en-nz"!==s||(s="en-gb");for(const t of e)if(t.lang.toLowerCase()===s&&t.name.toLowerCase().indexOf("google")>-1)return t;s=s.substr(0,2);for(const t of e)if(t.lang.substr(0,2).toLowerCase()===s&&t.name.toLowerCase().indexOf("google")>-1)return t;for(const t of e)if(t.lang.substr(0,2).toLowerCase()===s)return t;return null}static _createUtterance(e,t,s=!1,i,n){const o=new SpeechSynthesisUtterance;o.voice=t,o.text=e,o.lang=i,o.rate=.8;const r=this;return s&&o.addEventListener("end",function(){r.stop(),n()}),o.addEventListener("error",function(){r.stop(),n()}),o}static playMany(e,t,s,i=500){const n=[...e],o=()=>{const e=n.shift();e?this.play(e,t,()=>{setTimeout(o,i)}):s()};o()}static play(e,t,s){this._getVoices(i=>{const n=this._findVoice(i,t);if(this._isPlaying=!0,n){const i=this._createUtterance(e,n,!0,t,s);speechSynthesis.speak(i),Tracker.trackEvent("Action","speak_word")}})}static stop(){this._isPlaying=!1,speechSynthesis.cancel()}static isSupported(){return window.speechSynthesis&&window.speechSynthesis.getVoices&&BrowserDetector.isChrome()&&!navigator.userAgent.includes("Chromium")}static isPlaying(){return this._isPlaying}}TextToSpeech._isInitialized=!1,TextToSpeech._contructor(); -------------------------------------------------------------------------------- /src/content/extension-main.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | const tweaks = TweaksManager.getTweaks(getCurrentUrl()); 3 | let currentDocumentElement, interval; 4 | function destroyOldInstances() { 5 | window.ltAssistant && window.ltAssistant.destroy(), dispatchCustomEvent(document, LTAssistant.events.DESTROY, { type: "extension" }); 6 | } 7 | function initLTAssistant() { 8 | if (!(currentDocumentElement = document.documentElement)) return; 9 | if (currentDocumentElement.hasAttribute("data-lt-script-installed")) return void tweaks.init(); 10 | if ((destroyOldInstances(), currentDocumentElement.hasAttribute("data-lt-installed"))) return; 11 | const e = { 12 | onDestroy: () => { 13 | window.clearInterval(interval); 14 | }, 15 | }; 16 | (window.ltAssistant = new LTAssistant(e, tweaks)), 17 | window.clearInterval(interval), 18 | (interval = window.setInterval(() => { 19 | currentDocumentElement !== document.documentElement && initLTAssistant(); 20 | }, 1e3)); 21 | } 22 | function onMessage(e, t) { 23 | return isGetSelectedTextMessage(e) ? onGetSelectedTextMessage(t, e) : (isDestroyMessage(e) && onDestroyMessage(t, e), !1); 24 | } 25 | function onGetSelectedTextMessage(e, t) { 26 | if (window.innerHeight < 20 || window.innerWidth < 20) return !1; 27 | const n = tweaks.getSelectedText(); 28 | if (n) { 29 | const e = { initialCommand: "GET_SELECTED_TEXT", isSuccessful: !0, selectedText: n }; 30 | return Promise.resolve(e); 31 | } 32 | return !1; 33 | } 34 | function onDestroyMessage(e, t) { 35 | destroyOldInstances(); 36 | try { 37 | chrome.runtime.onMessage.removeListener(onMessage); 38 | } catch (e) {} 39 | } 40 | window.ltAssistant || (initLTAssistant(), chrome.runtime.onMessage.addListener(onMessage)); 41 | -------------------------------------------------------------------------------- /assets/images/ratings/thumpsup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icons/thumpdown 5 | Created with Sketch. 6 | 11 | -------------------------------------------------------------------------------- /assets/images/ratings/thumpsdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icons/thumpsup 5 | Created with Sketch. 6 | 11 | -------------------------------------------------------------------------------- /assets/images/redesign/lt-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/dialog_update.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/dialog_text_too_short.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/config/config.js: -------------------------------------------------------------------------------- 1 | /*! (C) Copyright 2020 LanguageTooler GmbH. All rights reserved. */ 2 | const config = { 3 | DICTIONARY_SYNC_INTERVAL: 72e5, 4 | RENDER_INTERVAL: 300, 5 | TOOLBAR_DECREASE_SIZE_INTERVAL: 900, 6 | VALIDATION_REQUEST_TIMEOUT: 5e4, 7 | INSTALL_URL: "https://languagetool.org/webextension/install", 8 | MAIN_SERVER_URL: "https://api.languagetool.org/v2", 9 | LOCAL_SERVER_URL: "http://localhost:8081/v2", 10 | FEEDBACK_SERVER_URL: "https://languagetool.org/send-feedback/", 11 | CLIENT_LOGIN_URL: "https://languagetool.org/client-login", 12 | SWITCH_TO_FALLBACK_SERVER_ERRORS: [502, 503, 504], 13 | MAIN_SERVER_RECHECK_INTERVAL: 18e5, 14 | MIN_TEXT_LENGTH: 5, 15 | MAX_TEXT_LENGTH: 1e4, 16 | MAX_TEXT_LENGTH_PREMIUM: 6e4, 17 | MAX_TEXT_LENGTH_CUSTOM_SERVER: Number.MAX_SAFE_INTEGER, 18 | PARTIAL_VALIDATION_CHUNK_LENGTH: 5e3, 19 | VALIDATION_DELAY: 1400, 20 | VALIDATION_MAX_DELAY: 3500, 21 | STOPPED_TYPING_TIMEOUT: 2250, 22 | COLORS: { 23 | GRAMMAR: { UNDERLINE: "#f2b24c", BACKGROUND: "rgba(242,179,77,0.3)", EMPHASIZE: "rgba(241,179,76,0.1)", TITLE: "#D2A013" }, 24 | STYLE: { UNDERLINE: "#D2CBFF", BACKGROUND: "rgba(210,203,255,0.2)", EMPHASIZE: "rgba(210,203,255,0.1)", TITLE: "#5C4CFF" }, 25 | LONG_SENTENCE: { UNDERLINE: "#D2CBFF", BACKGROUND: "rgba(210,203,255,0.2)", EMPHASIZE: "rgba(210,203,255,0.1)", TITLE: "#5C4CFF" }, 26 | SPELLING: { UNDERLINE: "#EB5757", BACKGROUND: "rgba(235,88,88,0.2)", EMPHASIZE: "rgba(239,88,88,0.1)", TITLE: "#F91A47" }, 27 | SYNONYMS: { UNDERLINE: "#0042d7" }, 28 | }, 29 | MAX_FIXES_COUNT: 5, 30 | MAX_EXCEPTION_COUNT: 10, 31 | MAX_USAGE_COUNT_ONBOARDING: 5, 32 | SUPPORTED_SYNONYM_LANGUAGES: ["de", "ru", "sv", "pt", "el", "en", "eo", "it", "fr", "es", "uk", "sk", "sl", "pl", "da", "ro", "nl", "ca"], 33 | COUPON_INTERVAL: 5184e6, 34 | PACKAGE: { BASIC: "Basic", PREMIUM: "Premium" }, 35 | //these options is for inclusive reviews extension 36 | MIN_REVIEW_LENGTH: 9, 37 | }; 38 | -------------------------------------------------------------------------------- /assets/images/dialog_disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/images/flags/sl-si.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /assets/images/toolbar_language_not_supported.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/validator_has_premium_errors.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /assets/images/dialog_language_not_supported.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/images/on.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | illustration 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/images/errors/3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/errors/3_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inclusive-code-comments", 3 | "description": "Checks your comments anywhere on the web: GitHub or Azure DevOps!", 4 | "version": "3.1.5", 5 | "homepage": "https://github.com/jonathanpeppers/inclusive-code-comments", 6 | "author": "Jonathan Peppers", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/jonathanpeppers/inclusive-code-comments" 10 | }, 11 | "scripts": { 12 | "start": "xt-build -e dev -w", 13 | "start:firefox": "xt-build -e dev -p firefox -w", 14 | "build": "xt-build -e prod", 15 | "build:firefox": "xt-build -e prod -p firefox", 16 | "clean": "xt-clean", 17 | "docs": "xt-docs", 18 | "test": "xt-test", 19 | "sync": "xt-sync" 20 | }, 21 | "babel": { 22 | "presets": [ 23 | "@babel/preset-env" 24 | ] 25 | }, 26 | "eslintIgnore": [ 27 | "test/**/*" 28 | ], 29 | "devDependencies": { 30 | "@types/chai": "^5.2.3", 31 | "@types/chrome": "^0.1.32", 32 | "@types/mocha": "^10.0.10", 33 | "extension-cli": "^1.2.4", 34 | "global": "^4.3.2", 35 | "onnxruntime-node": "1.19.2" 36 | }, 37 | "xtdocs": { 38 | "source": { 39 | "include": [ 40 | "src" 41 | ] 42 | }, 43 | "templates": { 44 | "systemName": "inclusive-code-comments", 45 | "systemSummary": "Checks your comments anywhere on the web: GitHub or Azure DevOps!", 46 | "systemColor": "#4CAF50" 47 | } 48 | }, 49 | "xtbuild": { 50 | "js_bundles": [ 51 | { 52 | "name": "packed", 53 | "src": [ 54 | "_import.js", 55 | "./src-packed/*.js" 56 | ] 57 | } 58 | ], 59 | "copyAsIs": [ 60 | "./src/**/*" 61 | ] 62 | }, 63 | "dependencies": { 64 | "@microsoft/applicationinsights-web": "^3.3.10", 65 | "onnxruntime-web": "1.19.2", 66 | "webpack": "5.93.0" 67 | }, 68 | "overrides": { 69 | "braces": "3.0.3", 70 | "chai": "4.3.10", 71 | "jsdoc": "4.0.2", 72 | "mocha": "10.2.0" 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /assets/images/gear.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/polyfills/custom.js: -------------------------------------------------------------------------------- 1 | !window.crypto&&window.msCrypto&&(window.crypto=window.msCrypto),navigator.languages||(navigator.languages=[navigator.language,navigator.userLanguage,navigator.browserLanguage]);try{new Range}catch(e){window.Range=function(){return document.createRange()}}window.SVGElement&&!SVGElement.prototype.contains&&(SVGElement.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}),document.contains||(document.contains=function(e){if(document===e||document.body===e||document.documentElement===e)return!0;if(document.documentElement&&document.documentElement.contains)return document.documentElement.contains(e);if(document.body&&document.body.contains)return document.body.contains(e);throw new Error("Cannot polyfill document.contains")}),function(e){try{return new MouseEvent("test"),!1}catch(e){}var t=function(t,n){n=n||{bubbles:!1,cancelable:!1};var o=document.createEvent("MouseEvent");return o.initMouseEvent(t,n.bubbles,n.cancelable,e,0,n.screenX||0,n.screenY||0,n.clientX||0,n.clientY||0,n.ctrlKey||!1,n.altKey||!1,n.shiftKey||!1,n.metaKey||!1,n.button||0,n.relatedTarget||null),o};t.prototype=Event.prototype,e.MouseEvent=t}(window),function(e){try{return new InputEvent("test"),!1}catch(e){}var t=function(t,n){n=n||{bubbles:!1,cancelable:!1};var o=document.createEvent("Event");return o.initEvent(t,n.bubbles,n.cancelable,e,0,n.screenX||0,n.screenY||0,n.clientX||0,n.clientY||0,n.ctrlKey||!1,n.altKey||!1,n.shiftKey||!1,n.metaKey||!1,n.button||0,n.relatedTarget||null),o};t.prototype=Event.prototype,e.InputEvent=t}(window),function(){if(!("parentElement"in Document.prototype&&"parentElement"in Text.prototype&&"parentElement"in Attr.prototype)){function e(){return this.parentNode instanceof Element?this.parentNode:null}try{Object.defineProperty(Attr.prototype,"parentElement",{configurable:!1,enumerable:!1,get:e})}catch(t){Attr.prototype.parentElement=e}try{Object.defineProperty(Text.prototype,"parentElement",{configurable:!1,enumerable:!1,get:e})}catch(t){Text.prototype.parentElement=e}try{Object.defineProperty(Element.prototype,"parentElement",{configurable:!1,enumerable:!1,get:e})}catch(t){Element.prototype.parentElement=e}try{Object.defineProperty(Document.prototype,"parentElement",{configurable:!1,enumerable:!1,get:e})}catch(t){Document.prototype.parentElement=e}}}(); -------------------------------------------------------------------------------- /assets/images/validator_no_errors.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | sharingdone 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/menu/menu.js: -------------------------------------------------------------------------------- 1 | class Menu{constructor(t,e,s,i,l,n,a=null){this._className=t,this._parentElement=s,this._dialog=i,this._appendElement=a,this._optionElements=[],this._options=e,this._document=s.ownerDocument,this._position=l,this._isSelectable=n,this._render()}_render(){this._overlay=this._document.createElement("lt-div"),this._overlay.setAttribute("data-lt-prevent-focus",""),this._overlay.classList.add("lt-menu-overlay","lt-menu-overlay--"+this._className),this._dialog.appendChild(this._overlay),this._element=this._document.createElement("lt-div"),this._element.setAttribute("data-lt-prevent-focus",""),this._element.classList.add("lt-menu","lt-menu--"+this._className,"lt-menu--position-"+this._position),this._parentElement.appendChild(this._element),this._options.forEach(t=>{const e=this._document.createElement("lt-div");e.classList.add("lt-menu__item","lt-menu__item--"+t.className),t.isClickable&&e.classList.add("lt-menu__item--clickable"),this._isSelectable&&e.classList.add("lt-menu__item--selectable"),this._element.appendChild(e);const s=this._document.createElement("lt-span");if(s.classList.add("lt-menu__item__label","lt-menu__item__label--"+t.className),s.textContent=t.label,e.appendChild(s),t.info){const s=this._document.createElement("lt-span");s.classList.add("lt-menu__item__info","lt-menu__item__info--"+t.className),s.textContent=t.info,e.appendChild(s)}this._optionElements.push(e)}),this._appendElement&&this._element.appendChild(this._appendElement)}show(){this._parentElement.classList.add("lt-menu-visible"),this._element.classList.add("lt-menu--show"),this._overlay.classList.add("lt-menu--show")}hide(){this._parentElement.classList.remove("lt-menu-visible"),this._element.classList.remove("lt-menu--show"),this._overlay.classList.remove("lt-menu--show")}getElement(){return this._element}getAllOptions(){return this._optionElements}getActiveOptions(){return this._optionElements}getOverlay(){return this._overlay}setInfo(t,e){if(t>=0&&t{t.classList.remove("lt-menu__item--active")}),t>=0&&t=0&&t 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/errors/6_premium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PRIVACY.md: -------------------------------------------------------------------------------- 1 | # Privacy Policy 2 | 3 | The Inclusive Code Reviews Browser Extension Team takes your privacy seriously. To better protect your privacy we provide this privacy policy notice explaining the way your personal information is collected and used. 4 | 5 | ## Collection of Routine Information 6 | 7 | This browser extension tracks basic information about their users. This information includes, but is not limited to, IP addresses, browser details, timestamps and referring pages. None of this information can personally identify specific users to this browser extension. The information is tracked for routine administration and maintenance purposes. 8 | 9 | ## Notes about OpenAI 10 | 11 | The "Ask an AI for Suggestions" feature transmits the selected text to our private instance of an Azure OpenAI service. The text content of this interaction is not recorded or stored by us. If you would prefer your text to not be sent over the Internet, you can simply disregard (and not use) this feature. 12 | 13 | ## Cookies 14 | 15 | Where necessary, this browser extension uses cookies (or settings) to store information about a user's preferences and history in order to better serve the user and/or present the user with customized content. 16 | 17 | ## Links to Third Party Websites 18 | 19 | We have included links on this browser extension for your use and reference. We are not responsible for the privacy policies on these websites. You should be aware that the privacy policies of these websites may differ from our own. 20 | 21 | ## Security 22 | 23 | The security of your personal information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security. 24 | 25 | ## Changes To This Privacy Policy 26 | 27 | This Privacy Policy is effective as of 1/19/2024 and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page. 28 | 29 | We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. If we make any material changes to this Privacy Policy, we will notify you via changes to the public GitHub repository, or by placing a prominent notice on our browser extension. 30 | 31 | ## Contact Information 32 | 33 | For any questions or concerns regarding the privacy policy, please file an issue at: 34 | 35 | https://github.com/jonathanpeppers/inclusive-code-reviews-browser/issues 36 | -------------------------------------------------------------------------------- /assets/images/20/white/icon_20_white_gear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/20/black/icon_20_black_gear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/dialog_text_too_long.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/flags/pt-mz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /assets/images/errors/8.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Slice 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------