Define more globals

This commit is contained in:
toasted-nutbread 2020-02-11 22:19:47 -05:00
parent ab9d2b38e0
commit e2ac478cb7
15 changed files with 15 additions and 4 deletions

View File

@ -49,6 +49,7 @@
"stringReverse": "readonly", "stringReverse": "readonly",
"promiseTimeout": "readonly", "promiseTimeout": "readonly",
"stringReplaceAsync": "readonly", "stringReplaceAsync": "readonly",
"parseUrl": "readonly",
"EventDispatcher": "readonly", "EventDispatcher": "readonly",
"EXTENSION_IS_BROWSER_EDGE": "readonly" "EXTENSION_IS_BROWSER_EDGE": "readonly"
} }

View File

@ -23,7 +23,7 @@ requestText, requestJson, optionsLoad
dictConfigured, dictTermsSort, dictEnabledSet, dictNoteFormat dictConfigured, dictTermsSort, dictEnabledSet, dictNoteFormat
audioGetUrl, audioInject audioGetUrl, audioInject
jpConvertReading, jpDistributeFuriganaInflected, jpKatakanaToHiragana jpConvertReading, jpDistributeFuriganaInflected, jpKatakanaToHiragana
Translator, AnkiConnect, AnkiNull, Mecab, BackendApiForwarder, JsonSchema*/ Translator, AnkiConnect, AnkiNull, Mecab, BackendApiForwarder, JsonSchema, ClipboardMonitor*/
class Backend { class Backend {
constructor() { constructor() {

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiClipboardGet, jpIsStringPartiallyJapanese*/
class ClipboardMonitor { class ClipboardMonitor {
constructor() { constructor() {

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiGetQueryParserTemplatesHtml, TemplateHandler*/
class QueryParserGenerator { class QueryParserGenerator {
constructor() { constructor() {

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiTermsFind, apiOptionsSet, apiTextParse, apiTextParseMecab, apiTemplateRender, TextScanner*/ /*global apiTermsFind, apiOptionsSet, apiTextParse, apiTextParseMecab, apiTemplateRender, TextScanner, QueryParserGenerator*/
class QueryParser extends TextScanner { class QueryParser extends TextScanner {
constructor(search) { constructor(search) {

View File

@ -17,7 +17,7 @@
*/ */
/*global jpIsStringPartiallyJapanese, apiOptionsSet, apiTermsFind, apiClipboardGet, apiGetEnvironmentInfo /*global jpIsStringPartiallyJapanese, apiOptionsSet, apiTermsFind, apiClipboardGet, apiGetEnvironmentInfo
Display, QueryParser*/ Display, QueryParser, ClipboardMonitor*/
class DisplaySearch extends Display { class DisplaySearch extends Display {
constructor() { constructor() {

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global getOptionsContext, getOptionsMutable, getOptionsFullMutable, settingsSaveOptions, apiOptionsGetFull /*global getOptionsContext, getOptionsMutable, getOptionsFullMutable, settingsSaveOptions, apiOptionsGetFull, apiOptionsGet
utilBackgroundIsolate, utilDatabaseDeleteDictionary, utilDatabaseGetDictionaryInfo, utilDatabaseGetDictionaryCounts utilBackgroundIsolate, utilDatabaseDeleteDictionary, utilDatabaseGetDictionaryInfo, utilDatabaseGetDictionaryCounts
utilDatabasePurge, utilDatabaseImport utilDatabasePurge, utilDatabaseImport
storageUpdateStats, storageEstimate storageUpdateStats, storageEstimate

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global TextSourceElement, TextSourceRange, DOM*/
const REGEX_TRANSPARENT_COLOR = /rgba\s*\([^)]*,\s*0(?:\.0+)?\s*\)/; const REGEX_TRANSPARENT_COLOR = /rgba\s*\([^)]*,\s*0(?:\.0+)?\s*\)/;

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global popupNestedInitialize, Display*/
class DisplayFloat extends Display { class DisplayFloat extends Display {
constructor() { constructor() {

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global PopupProxyHost, PopupProxy, Frontend*/
async function main() { async function main() {
const data = window.frontendInitializationData || {}; const data = window.frontendInitializationData || {};

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiGetZoom, apiOptionsGet, apiTermsFind, apiKanjiFind, docSentenceExtract, TextScanner*/
class Frontend extends TextScanner { class Frontend extends TextScanner {
constructor(popup, ignoreNodes) { constructor(popup, ignoreNodes) {

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiOptionsGet*/
let popupNestedInitialized = false; let popupNestedInitialized = false;

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiFrameInformationGet, FrontendApiReceiver, Popup*/
class PopupProxyHost { class PopupProxyHost {
constructor() { constructor() {

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global FrontendApiSender*/
class PopupProxy { class PopupProxy {
constructor(depth, parentId, parentFrameId, url) { constructor(depth, parentId, parentFrameId, url) {

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/*global apiInjectStylesheet*/
class Popup { class Popup {
constructor(id, depth, frameIdPromise) { constructor(id, depth, frameIdPromise) {