clear-urls-browser-extension/popup.js
astaar 2287c7041f Ultra commit
jeeeeez
2017-08-06 18:34:02 +02:00

47 lines
1.2 KiB
JavaScript

var status = "enabled";
var exception = "false";
function changeStatus() {
var text = $("#statusText");
var button = $("#statusBtn");
if(status == "enabled") {
console.log("was enabled");
text.html("Dis");
button.removeClass("statusEnabled").addClass("statusDisabled");
status = "disabled";
console.log("is disabled");
}
else {
console.log("was disabled");
text.html("En");
button.removeClass("statusDisabled").addClass("statusEnabled");
status = "enabled";
console.log("is enabled");
}
};
/*
function handleException() {
var element = $("#exception");
var val = "Enable on page";
if(exception == false) {
val = "Disable on page";
exception = "true";
element.removeClass().addClass("disable");
}
else {
exception = "false";
element.removeClass().addClass("enable");
}
element.html(val);
};
*/
/*
$(document).ready(function() {
$("#statusBtn").on("click", changeStatus);
//$("#exception").on("click", handleException);
});
*/
document.addEventListener("DOMContentLoaded", function() {
$("#statusBtn").on("click", changeStatus);
});