mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 08:37:11 +02:00
#1013: Firefox support
This commit is contained in:
parent
0ca84246f5
commit
2504f8ad35
@ -1119,13 +1119,18 @@ var httpObserver = {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*if ( result.redirectUrl ) {
|
||||
channel.redirectionLimit = 1;
|
||||
if ( result.redirectUrl ) {
|
||||
if ( type === 'main_frame' ) {
|
||||
channel.cancel(this.ABORT);
|
||||
vAPI.tabs.open({ tabId: details.tabId, url: result.redirectUrl });
|
||||
return true;
|
||||
}
|
||||
/*channel.redirectionLimit = 1;
|
||||
channel.redirectTo(
|
||||
Services.io.newURI(result.redirectUrl, null, null)
|
||||
);
|
||||
return true;
|
||||
}*/
|
||||
return true;*/
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
@ -20,7 +20,13 @@
|
||||
*/
|
||||
|
||||
/* global vAPI, uDom */
|
||||
/* exported renderElapsedTime */
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// This file should always be included at the end of the `body` tag, so as
|
||||
// to ensure all i18n targets are already loaded.
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
@ -28,25 +34,26 @@
|
||||
|
||||
// Helper to deal with the i18n'ing of HTML files.
|
||||
|
||||
uDom.onLoad(function() {
|
||||
uDom('[data-i18n]').forEach(function(elem) {
|
||||
elem.html(vAPI.i18n(elem.attr('data-i18n')));
|
||||
});
|
||||
uDom('[title]').forEach(function(elem) {
|
||||
var title = vAPI.i18n(elem.attr('title'));
|
||||
if ( title ) {
|
||||
elem.attr('title', title);
|
||||
}
|
||||
});
|
||||
uDom('[placeholder]').forEach(function(elem) {
|
||||
elem.attr('placeholder', vAPI.i18n(elem.attr('placeholder')));
|
||||
});
|
||||
uDom('[data-i18n-tip]').forEach(function(elem) {
|
||||
elem.attr(
|
||||
'data-tip',
|
||||
vAPI.i18n(elem.attr('data-i18n-tip')).replace(/<br>/g, '')
|
||||
);
|
||||
});
|
||||
uDom('[data-i18n]').forEach(function(elem) {
|
||||
elem.html(vAPI.i18n(elem.attr('data-i18n')));
|
||||
});
|
||||
|
||||
uDom('[title]').forEach(function(elem) {
|
||||
var title = vAPI.i18n(elem.attr('title'));
|
||||
if ( title ) {
|
||||
elem.attr('title', title);
|
||||
}
|
||||
});
|
||||
|
||||
uDom('[placeholder]').forEach(function(elem) {
|
||||
elem.attr('placeholder', vAPI.i18n(elem.attr('placeholder')));
|
||||
});
|
||||
|
||||
uDom('[data-i18n-tip]').forEach(function(elem) {
|
||||
elem.attr(
|
||||
'data-tip',
|
||||
vAPI.i18n(elem.attr('data-i18n-tip')).replace(/<br>/g, '')
|
||||
);
|
||||
});
|
||||
|
||||
/******************************************************************************/
|
||||
@ -74,3 +81,7 @@ vAPI.i18n.renderElapsedTimeToString = function(tstamp) {
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
})();
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user