1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

#1013: Firefox support

This commit is contained in:
gorhill 2015-03-26 09:50:07 -04:00
parent 0ca84246f5
commit 2504f8ad35
2 changed files with 40 additions and 24 deletions

View File

@ -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;
},

View File

@ -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,26 +34,27 @@
// 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, '')
);
});
});
/******************************************************************************/
@ -74,3 +81,7 @@ vAPI.i18n.renderElapsedTimeToString = function(tstamp) {
};
/******************************************************************************/
})();
/******************************************************************************/