mirror of
https://github.com/wassname/mad.git
synced 2026-06-27 16:10:31 +08:00
changes, things will never be the saaaamee
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@
|
||||
</a>
|
||||
-->
|
||||
|
||||
<div class="row content">
|
||||
<div class="row content-a">
|
||||
<div class="col-md-8 col-md-offset-2 text-center">
|
||||
<p>Read and <strong>type the text below</strong> if you <strong>REALLY HAVE</strong> to go to your site:</p>
|
||||
<div class="jumbotron-cust">
|
||||
|
||||
+2
-4
@@ -1,13 +1,11 @@
|
||||
var blockChecker,
|
||||
var globalOptions,
|
||||
blockChecker,
|
||||
blockList,
|
||||
blockService;
|
||||
|
||||
blockService = BlockListFactory.getBlockList();
|
||||
blockService.set(DefaultList);
|
||||
blockList = blockService.get();
|
||||
console.log(blockList);
|
||||
|
||||
console.log("did background.js load properly");
|
||||
blockChecker = new BlockCheck(DefaultList);
|
||||
|
||||
var prevSite = "";
|
||||
|
||||
+3
-3
@@ -38,11 +38,11 @@ var BlockCheck = function(blocklist){
|
||||
this.blocklist = blocklist;
|
||||
|
||||
this.redirectOnMatch = function(req){
|
||||
console.log(req);
|
||||
var blocked = regexMatching(blocklist, req.url) && (req.tabId!==prevTabId) ;
|
||||
if (blocked){
|
||||
if (blocked && req.method=="GET"){
|
||||
console.log(req);
|
||||
storedUrl = req.url;
|
||||
prevTabId= req.tabId;
|
||||
if (req.tabId!==chrome.extension.getURL) prevTabId= req.tabId;
|
||||
return {
|
||||
redirectUrl : chrome.extension.getURL("background.html")
|
||||
};
|
||||
|
||||
@@ -20,7 +20,6 @@ window.onload = function setupUpdater(){
|
||||
, count=document.getElementById('message')
|
||||
, targetText = defSayings[Math.floor(Math.random()*defSayings.length)]
|
||||
, a = FuzzySet([targetText])
|
||||
, oldText=input
|
||||
, timeout=null;
|
||||
|
||||
set(target, targetText);
|
||||
|
||||
+3
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "MAD - Mindfulness Anti Distraction",
|
||||
"name": "MAD - Mindful Anti Distraction",
|
||||
"description": "This extension will hopefully help you be less distracted (untested)",
|
||||
"version": "0.1.0.2",
|
||||
"version": "0.1.0.4",
|
||||
"background": {
|
||||
"scripts": ["js/checkerino.js","background.js"],
|
||||
"pages": ["background.html"]
|
||||
@@ -23,6 +23,7 @@
|
||||
"activeTab",
|
||||
"webRequest",
|
||||
"webRequestBlocking",
|
||||
"storage",
|
||||
"<all_urls>",
|
||||
"tabs"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>MAD Options</title>
|
||||
<script src="js/bootstrap.min.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>
|
||||
<div class="text-center">
|
||||
<h1>Options</h1>
|
||||
</div>
|
||||
|
||||
Favorite color:
|
||||
<select id="color">
|
||||
<option value="red">red</option>
|
||||
<option value="green">green</option>
|
||||
<option value="blue">blue</option>
|
||||
<option value="yellow">yellow</option>
|
||||
</select>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" id="like">
|
||||
I like colors.
|
||||
</label>
|
||||
|
||||
<div id="status"></div>
|
||||
<button id="save">Save</button>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user