mirror of
https://github.com/wassname/mad.git
synced 2026-08-12 12:10:25 +08:00
adding extension icon popup functionality
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ blockService.set(DefaultList);
|
||||
blockList = blockService.get();
|
||||
blockChecker = new BlockCheck(DefaultList);
|
||||
|
||||
var currTabs = []; //TODO bugfix
|
||||
var currTabs = []; //TODO add additional information to these objects, e.g. time
|
||||
var prevSite = "";
|
||||
|
||||
chrome.webRequest.onBeforeRequest.addListener(
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
//Listener for Disable
|
||||
|
||||
$(function(){
|
||||
$("#enable_button").click(function(){
|
||||
console.log("button is pressed");
|
||||
});
|
||||
});
|
||||
@@ -29,11 +29,9 @@ window.onload = function setupUpdater(){
|
||||
var newText=input.value;
|
||||
var score = a.get(newText)[0][0];
|
||||
if (score>0.88) {
|
||||
//debug set(count, "You are " + score*100 + "% accurate (need >91)");
|
||||
passed = true;
|
||||
return;
|
||||
} else if (score> 0.1){
|
||||
//debug set(count, "You are " + score*100 + "% accurate (need >91)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,17 +48,9 @@ var activate = function(){
|
||||
active: true,
|
||||
windowId: window.id
|
||||
}, function (tabs, req){
|
||||
/* console.log("GPS CWGC tabs");
|
||||
console.log(tabs);
|
||||
console.log("GPS CWGC tabs[0]");
|
||||
console.log(tabs[0]);
|
||||
console.log("GPS CWGC currTabs");
|
||||
console.log(currTabs);*/
|
||||
result = $.grep(currTabs, function(e){
|
||||
return e.tabId == tabs[0].id;
|
||||
});
|
||||
/* console.log("result");
|
||||
console.log(result);*/
|
||||
req = result;
|
||||
if (req.length==0){
|
||||
return "";
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@
|
||||
|
||||
"browser_action": {
|
||||
"default_icon": "img/128.png",
|
||||
"default_title": "MAD"
|
||||
"default_title": "MAD",
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
|
||||
"web_accessible_resources":[
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/popup.js"></script>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="width:150px">
|
||||
<div> Yo Swag Son: </div>
|
||||
<div id="enabler">
|
||||
<input id="enable_button" class="btn btn-primary" type="submit" value="Don't Kill My Vibe"> </input> </div>
|
||||
<div id="blacklist">
|
||||
<input id="blacklist_button" class="btn btn-primary" type="submit" value="This shit aint cool."> </input></div>
|
||||
<div id="whitelist">
|
||||
<input id="whitelist_button" class="btn btn-primary" type="submit" value="This shit ballin"> </input></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user