use meta tags too
This commit is contained in:
@@ -268,7 +268,12 @@ function themeWindow(window) {
|
||||
if (Object.keys(them).length > 0) {
|
||||
browser.theme.update(window.id, them.originalTheme);
|
||||
}else {
|
||||
browser.theme.reset();
|
||||
browser.theme.update(window.id, {
|
||||
colors: {
|
||||
frame: null,
|
||||
toolbar: null
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
browser.storage.local.get('originalTheme').then(unSetTheme, onError);
|
||||
|
||||
32
scrub.js
32
scrub.js
@@ -604,6 +604,7 @@ var coolheadersSetup = function(e) {
|
||||
title: header.value
|
||||
});
|
||||
browser.pageAction.show(e.tabId);
|
||||
break;
|
||||
}
|
||||
if (header.name.toUpperCase() === 'I2P-TORRENTLOCATION' || header.name.toUpperCase() === 'I2P-TORRENTLOCATION') {
|
||||
browser.pageAction.setPopup({
|
||||
@@ -616,8 +617,39 @@ var coolheadersSetup = function(e) {
|
||||
tabId: e.tabId,
|
||||
title: header.value
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
function checkPageActions(resp) {
|
||||
function checkBothActions(txt) {
|
||||
if (txt.includes('meta-i2p-location') || txt.includes('META-I2P-LOCATION')) {
|
||||
browser.pageAction.setPopup({
|
||||
tabId: e.tabId,
|
||||
popup: 'location.html'
|
||||
});
|
||||
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
|
||||
browser.pageAction.setTitle({
|
||||
tabId: e.tabId,
|
||||
title: header.value
|
||||
});
|
||||
browser.pageAction.show(e.tabId);
|
||||
}else if (txt.includes('meta-i2p-torrentlocation') || txt.includes('META-I2P-TORRENTLOCATION')) {
|
||||
if (header.name.toUpperCase() === 'I2P-TORRENTLOCATION' || header.name.toUpperCase() === 'I2P-TORRENTLOCATION') {
|
||||
browser.pageAction.setPopup({
|
||||
tabId: tabId.id,
|
||||
popup: 'torrent.html'
|
||||
});
|
||||
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
|
||||
browser.pageAction.show(e.tabId);
|
||||
browser.pageAction.setTitle({
|
||||
tabId: e.tabId,
|
||||
title: header.value
|
||||
});
|
||||
}
|
||||
}
|
||||
resp.text().then(checkBothActions);
|
||||
}
|
||||
fetch(e.url).then(checkPageActions);
|
||||
resolve({responseHeaders: e.responseHeaders});
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user