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