Browse Source

this fixes warning/error entries in browser console

pull/2/head
gorhill 10 years ago
parent
commit
535a46db37
  1. 7
      src/js/contentscript-end.js
  2. 5
      src/js/contentscript-start.js
  3. 4
      src/js/start.js

7
src/js/contentscript-end.js

@ -36,7 +36,12 @@
// https://github.com/chrisaljoudi/uBlock/issues/464 // https://github.com/chrisaljoudi/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
//console.debug('contentscript-end.js > not a HTLMDocument'); //console.debug('contentscript-end.js > not a HTLMDocument');
return false;
return;
}
// This can also happen (for example if script injected into a `data:` URI doc)
if ( !window.location ) {
return;
} }
// This can happen // This can happen

5
src/js/contentscript-start.js

@ -38,6 +38,11 @@ if ( document instanceof HTMLDocument === false ) {
return; return;
} }
// This can also happen (for example if script injected into a `data:` URI doc)
if ( !window.location ) {
return;
}
// This can happen // This can happen
if ( !vAPI ) { if ( !vAPI ) {
//console.debug('contentscript-start.js > vAPI not found'); //console.debug('contentscript-start.js > vAPI not found');

4
src/js/start.js

@ -57,7 +57,9 @@ var defaultLocalUserSettings = {
].join(''), ].join(''),
placeholderBorder: '1px solid rgba(0, 0, 0, 0.05)', placeholderBorder: '1px solid rgba(0, 0, 0, 0.05)',
placeholderDocument: [ placeholderDocument: [
'<html><head><style>',
'<html><head>',
'<meta charset="utf-8">',
'<style>',
'body { ', 'body { ',
'background: {{bg}};', 'background: {{bg}};',
'color: gray;', 'color: gray;',

Loading…
Cancel
Save