Permalink
Browse files

Set all_bing_searches=true on update

  • Loading branch information...
TheoBr committed Sep 14, 2017
1 parent 8cbf868 commit ac6e0cbe4e6ea687f81e1fde8d57e50418986299
Showing with 16 additions and 6 deletions.
  1. +1 −0 Chrometana/js/bootstrap.js
  2. +13 −4 Chrometana/js/options.js
  3. +1 −1 Chrometana/manifest.json
  4. +1 −1 package.json
@@ -105,6 +105,7 @@
if(details.reason === "install"){
chrome.tabs.create({url: "html/options.html?newinstall=yes"});
}else if(details.reason === "update"){
chrome.tabs.create({url: "html/options.html?update=yes"});
var thisVersion = chrome.runtime.getManifest().version;
console.log("Updated from " + details.previousVersion + " to " + thisVersion + "!");
}
View
@@ -11,8 +11,17 @@
addClass(installadvice, 'visible');
}
if (getURLVariable("update") === "yes"){
// var installadvice = document.getElementById('installadvice');
// addClass(installadvice, 'visible');
chrome.storage.sync.get(['search_engine','custom_engine','enable_open_website','all_bing_searches','exclude_settings_app'], function (obj) {
console.log(obj);
});
save_options("all_bing_searches", true);
}
var optionCaller = function() {
save_options('search_engine', this, this.getAttribute('value'));
save_options('search_engine', this.getAttribute('value'));
};
var handleMouseover = function() {
@@ -42,10 +51,10 @@
value = false;
}
}
save_options(this.id, this, value);
save_options(this.id, value);
};
function save_options(key, element, value){
function save_options(key, value){
var options = {};
options[key] = value;
if(key === "custom_engine"){
@@ -68,7 +77,7 @@
search_engine: defaultSE,
custom_engine: '',
enable_open_website: false,
all_bing_searches: false,
all_bing_searches: true,
exclude_settings_app: true
}, function(items) {
updateDisplay(items);
View
@@ -4,7 +4,7 @@
"name": "Chrometana - Redirect Bing Somewhere Better",
"short_name": "Chrometana",
"description": "Redirect all Bing (and therefore Cortana) searches to a search engine of your choice!",
"version": "2.0.1",
"version": "2.0.2",
"options_page": "html/options.html",
"permissions": [
View
@@ -2,7 +2,7 @@
"name": "Chrometana",
"description": "Redirect Bing Somewhere Better http://Chrometana.Theo.li",
"author": "Theo Browne",
"version": "2.0.1",
"version": "2.0.2",
"devDependencies": {
"jshint": "^2.6.0"
},

0 comments on commit ac6e0cb

Please sign in to comment.