1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-21 18:02:34 +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_test': self.RegExp.prototype.test,
'RegExp_exec': self.RegExp.prototype.exec,
'safeLog': console.log.bind(console),
'log': console.log.bind(console),
'uboLog': function(msg) {
if ( msg !== '' ) {
this.safeLog(`[uBO] ${msg}`);
}
if ( msg === '' ) { return; }
this.log(`[uBO] ${msg}`);
},
};
scriptletGlobals.set('safeSelf', safe);