Fix: use arrow function for IIFE
This commit is contained in:
parent
adc0c8025a
commit
62748b3b79
|
@ -3,7 +3,7 @@
|
|||
'use strict';
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var usercssHelper = (function () {
|
||||
var usercssHelper = (() => {
|
||||
function buildMeta(style) {
|
||||
if (style.usercssData) {
|
||||
return Promise.resolve(style);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
'use strict';
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var regExpTester = (function () {
|
||||
var regExpTester = (() => {
|
||||
const GET_FAVICON_URL = 'https://www.google.com/s2/favicons?domain=';
|
||||
const OWN_ICON = chrome.runtime.getManifest().icons['16'];
|
||||
const cachedRegexps = new Map();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
(function () {
|
||||
(() => {
|
||||
const params = getParams();
|
||||
let liveReload = false;
|
||||
let installed = false;
|
||||
|
|
|
@ -103,7 +103,7 @@ function tNodeList(nodes) {
|
|||
|
||||
function tDocLoader() {
|
||||
t.DOMParser = new DOMParser();
|
||||
t.cache = (function () {
|
||||
t.cache = (() => {
|
||||
try {
|
||||
return JSON.parse(localStorage.L10N);
|
||||
} catch (e) {}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
'use strict';
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var mozParser = (function () {
|
||||
var mozParser = (() => {
|
||||
// direct & reverse mapping of @-moz-document keywords and internal property names
|
||||
const propertyToCss = {urls: 'url', urlPrefixes: 'url-prefix', domains: 'domain', regexps: 'regexp'};
|
||||
const CssToProperty = {'url': 'urls', 'url-prefix': 'urlPrefixes', 'domain': 'domains', 'regexp': 'regexps'};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// loadScript(script: Array<Promise|string>|string): Promise
|
||||
// eslint-disable-next-line no-var
|
||||
var loadScript = (function () {
|
||||
var loadScript = (() => {
|
||||
const cache = new Map();
|
||||
|
||||
function inject(file) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
'use strict';
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var usercss = (function () {
|
||||
var usercss = (() => {
|
||||
// true for global, false for private
|
||||
const METAS = {
|
||||
__proto__: null,
|
||||
|
@ -99,7 +99,7 @@ var usercss = (function () {
|
|||
}
|
||||
};
|
||||
|
||||
const colorParser = (function () {
|
||||
const colorParser = (() => {
|
||||
const el = document.createElement('div');
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=14563
|
||||
document.head.appendChild(el);
|
||||
|
|
Loading…
Reference in New Issue
Block a user