mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 09:39:38 +02:00
Remove pointless local scoping
This commit is contained in:
parent
35854e4baf
commit
5688888ec1
@ -26,10 +26,6 @@
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
(function(self) {
|
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
vAPI.T0 = Date.now();
|
vAPI.T0 = Date.now();
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -65,10 +61,10 @@ vAPI.webextFlavor = {
|
|||||||
|
|
||||||
// Asynchronous
|
// Asynchronous
|
||||||
if (
|
if (
|
||||||
self.browser instanceof Object &&
|
browser instanceof Object &&
|
||||||
typeof self.browser.runtime.getBrowserInfo === 'function'
|
typeof browser.runtime.getBrowserInfo === 'function'
|
||||||
) {
|
) {
|
||||||
self.browser.runtime.getBrowserInfo().then(info => {
|
browser.runtime.getBrowserInfo().then(info => {
|
||||||
flavor.major = parseInt(info.version, 10) || 60;
|
flavor.major = parseInt(info.version, 10) || 60;
|
||||||
soup.add(info.vendor.toLowerCase())
|
soup.add(info.vendor.toLowerCase())
|
||||||
.add(info.name.toLowerCase());
|
.add(info.name.toLowerCase());
|
||||||
@ -77,7 +73,7 @@ vAPI.webextFlavor = {
|
|||||||
}
|
}
|
||||||
dispatch();
|
dispatch();
|
||||||
});
|
});
|
||||||
if ( self.browser.runtime.getURL('').startsWith('moz-extension://') ) {
|
if ( browser.runtime.getURL('').startsWith('moz-extension://') ) {
|
||||||
soup.add('mozilla')
|
soup.add('mozilla')
|
||||||
.add('firefox')
|
.add('firefox')
|
||||||
.add('user_stylesheet')
|
.add('user_stylesheet')
|
||||||
@ -120,11 +116,8 @@ vAPI.webextFlavor = {
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
vAPI.download = function(details) {
|
vAPI.download = function(details) {
|
||||||
if ( !details.url ) {
|
if ( !details.url ) { return; }
|
||||||
return;
|
const a = document.createElement('a');
|
||||||
}
|
|
||||||
|
|
||||||
var a = document.createElement('a');
|
|
||||||
a.href = details.url;
|
a.href = details.url;
|
||||||
a.setAttribute('download', details.filename || '');
|
a.setAttribute('download', details.filename || '');
|
||||||
a.setAttribute('type', 'text/plain');
|
a.setAttribute('type', 'text/plain');
|
||||||
@ -206,10 +199,6 @@ vAPI.localStorage = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
})(this);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user