mirror of https://github.com/gorhill/uBlock.git
Safari: don't double inject, and cleanup stray unicode
This commit is contained in:
parent
6e7f26f925
commit
5b16418e60
|
@ -55,7 +55,7 @@
|
||||||
},
|
},
|
||||||
"www.fanboy.co.nz/fanboy-antifacebook.txt": {
|
"www.fanboy.co.nz/fanboy-antifacebook.txt": {
|
||||||
"off": true,
|
"off": true,
|
||||||
"title": "Anti-ThirdpartySocial (see warning inside list)",
|
"title": "Anti-ThirdpartySocial (see warning inside list)",
|
||||||
"group": "social",
|
"group": "social",
|
||||||
"homeURL": "https://www.fanboy.co.nz/fanboy-antifacebook.txt"
|
"homeURL": "https://www.fanboy.co.nz/fanboy-antifacebook.txt"
|
||||||
},
|
},
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
var vAPI = self.vAPI = self.vAPI || {};
|
var vAPI = self.vAPI = self.vAPI || {};
|
||||||
|
if(vAPI.vapiClientInjected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vAPI.vapiClientInjected = true;
|
||||||
vAPI.safari = true;
|
vAPI.safari = true;
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
var messagingConnector = function(response) {
|
var messagingConnector = function(response) {
|
||||||
|
@ -143,7 +147,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
vAPI.canExecuteContentScript = function() {
|
vAPI.canExecuteContentScript = function() {
|
||||||
return(/^https?:/.test(location.protocol) && typeof safari === "object");
|
return (/^https?:/.test(location.protocol) && typeof safari === "object");
|
||||||
};
|
};
|
||||||
|
|
||||||
// The following code should run only in content pages
|
// The following code should run only in content pages
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var whenSizeChanges = function(elm, callback) {
|
var whenSizeChanges = function(elm, callback) {
|
||||||
var reset = function() {
|
var reset = function() {
|
||||||
|
@ -63,3 +65,4 @@ var onLoaded = function() {
|
||||||
whenSizeChanges(body, updateSize);
|
whenSizeChanges(body, updateSize);
|
||||||
};
|
};
|
||||||
window.addEventListener('load', onLoaded);
|
window.addEventListener('load', onLoaded);
|
||||||
|
})();
|
||||||
|
|
Loading…
Reference in New Issue