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",
"promiseTimeout": "readonly",
"stringReplaceAsync": "readonly",
"parseUrl": "readonly",
"EventDispatcher": "readonly",
"EXTENSION_IS_BROWSER_EDGE": "readonly"
}

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
* 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 {
constructor(search) {

View File

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

View File

@ -16,7 +16,7 @@
* 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
utilDatabasePurge, utilDatabaseImport
storageUpdateStats, storageEstimate

View File

@ -16,6 +16,7 @@
* 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*\)/;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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