...
This commit is contained in:
parent
2acf3b0ce2
commit
918e606d9f
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
1000 Bots - browser extension to surf the www like a google-bot
|
1000 Bots - Surf the Web as Googlebot
|
||||||
Copyright (C) 2020 !Mediengruppe Bitnik, connect@bitnik.org
|
|
||||||
|
Copyleft (C) 2020 !Mediengruppe Bitnik, connect@bitnik.org
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -27,14 +28,16 @@ var status = 0;
|
|||||||
|
|
||||||
function set_extension_status_ON() {
|
function set_extension_status_ON() {
|
||||||
status = 1;
|
status = 1;
|
||||||
console.log('Setting status to ON');
|
//console.log('Setting status to ON');
|
||||||
browser.browserAction.setIcon({path: 'icon_ON_48.png'});
|
browser.browserAction.setIcon({path: 'icon_ON_48.png'});
|
||||||
|
browser.browserAction.setTitle({title: "1000 Bots"});
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_extension_status_OFF() {
|
function set_extension_status_OFF() {
|
||||||
status = 0;
|
status = 0;
|
||||||
console.log('Setting status to OFF');
|
//console.log('Setting status to OFF');
|
||||||
browser.browserAction.setIcon({path: 'icon_OFF_48.png'});
|
browser.browserAction.setIcon({path: 'icon_OFF_48.png'});
|
||||||
|
browser.browserAction.setTitle({title: "1000 Bots activate"});
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_icon(){
|
function update_icon(){
|
||||||
@ -48,7 +51,7 @@ function update_icon(){
|
|||||||
|
|
||||||
function rewrite_user_agent_header(e){
|
function rewrite_user_agent_header(e){
|
||||||
|
|
||||||
// console.log('Browser http request!');
|
//console.log('Browser http request!');
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
// console.log('Nothing to do');
|
// console.log('Nothing to do');
|
||||||
@ -60,7 +63,7 @@ function rewrite_user_agent_header(e){
|
|||||||
header.value = user_agent;
|
header.value = user_agent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log('Set user-agent header to: ' + user_agent);
|
//console.log('Set user-agent header to: ' + user_agent);
|
||||||
return {requestHeaders: e.requestHeaders};
|
return {requestHeaders: e.requestHeaders};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user