1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-22 10:22:51 +01:00

No need for redundant "safe"

This commit is contained in:
Raymond Hill 2023-04-15 11:14:14 -04:00
parent dd05d1a090
commit cc062d3a8a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -49,11 +49,10 @@ function safeSelf() {
'RegExp': self.RegExp, 'RegExp': self.RegExp,
'RegExp_test': self.RegExp.prototype.test, 'RegExp_test': self.RegExp.prototype.test,
'RegExp_exec': self.RegExp.prototype.exec, 'RegExp_exec': self.RegExp.prototype.exec,
'safeLog': console.log.bind(console), 'log': console.log.bind(console),
'uboLog': function(msg) { 'uboLog': function(msg) {
if ( msg !== '' ) { if ( msg === '' ) { return; }
this.safeLog(`[uBO] ${msg}`); this.log(`[uBO] ${msg}`);
}
}, },
}; };
scriptletGlobals.set('safeSelf', safe); scriptletGlobals.set('safeSelf', safe);