mirror of
https://github.com/wassname/mad.git
synced 2026-07-22 12:50:09 +08:00
small changes
This commit is contained in:
+9
-10
@@ -14,26 +14,25 @@
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="page-header text-center">
|
||||
<h1>MAD - Mindfulness Anti Distraction</h1>
|
||||
<h1>MAD:<small> Mindfulness Anti Distraction</small></h1>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-2 text-center">
|
||||
<p class="lead">Type word for word the following if you REALLY HAVE to go to your site:</p>
|
||||
<p class="lead">Read and <strong>type the text below</strong> if you REALLY HAVE to go to your site:</p>
|
||||
<div class="jumbotron">
|
||||
<blockquote>
|
||||
<p id="target"></p>
|
||||
<p class="lead" id="target"></p>
|
||||
</blockquote>
|
||||
<textarea id="input" class="form-control" rows="3"></textarea>
|
||||
<p id="original"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<input id="submit1" class="btn btn-primary" type="submit" value="Submit">
|
||||
<a id="submit2" class="btn btn-success" href="#" disabled="enabled">Go Back</a>
|
||||
<br><p id="percent"></p>
|
||||
<textarea id="input" class="form-control" rows="3"></textarea>
|
||||
<input id="submit1" class="btn btn-primary" type="submit" value="Verify">
|
||||
<a id="submit2" class="btn btn-success" href="#" disabled="enabled">Enter Site</a>
|
||||
<br><strong></strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h1 class="text-center">Change the Habit</h1>
|
||||
<h1 class="text-center">Do something more rewarding instead!</h1>
|
||||
<br>
|
||||
<div id="alternate" class="row text-center">
|
||||
<div class="col-md-4 col-md-offset-2">
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
body{
|
||||
color: #0A7ED7;
|
||||
font-family:
|
||||
'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
color: #F50042;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
|
||||
+8
-9
@@ -5,11 +5,12 @@ function set(el,text){
|
||||
|
||||
var defSayings = [
|
||||
"I am in control over my actions",
|
||||
"I have done my main goals, and need to use this website",
|
||||
"This site is simply a small tool",
|
||||
"I have done my main goals for the day, and need to use this website",
|
||||
"Sites are simply tools, they don't control me",
|
||||
"Resisting this site is easy",
|
||||
"I ain't gonna get tricky tricked",
|
||||
"Life's boo boo, but I'll get through too",
|
||||
"I ain't gonna get tricky tricked by my mindless monotony",
|
||||
"This site is boo boo",
|
||||
"I am going here not out of habit, but for a solid purpose",
|
||||
"Imma take a second and think"
|
||||
]
|
||||
/* setupUpdater will be called once, on page load.
|
||||
@@ -28,17 +29,15 @@ window.onload = function setupUpdater(){
|
||||
set(target, targetText);
|
||||
|
||||
|
||||
/* handleChange is called 200ms after the user stops
|
||||
typing. */
|
||||
function handleChange(){
|
||||
var newText=input.value;
|
||||
var score = a.get(newText)[0][0];
|
||||
if (score>0.91) {
|
||||
set(count, "");
|
||||
// set(count, "");
|
||||
passed = true;
|
||||
return;
|
||||
} else if (score> 0.1){
|
||||
set(count, "You are " + score*100 + "% accurate (need >91)");
|
||||
//debug set(count, "You are " + score*100 + "% accurate (need >91)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ window.onload = function setupUpdater(){
|
||||
$(function(){
|
||||
$(".btn-primary").click(function(){
|
||||
if (passed){
|
||||
$("strong").text("I hope you don't regret this");
|
||||
$("strong").text("You've Unlocked The Button...\nI hope you don't regret this");
|
||||
$(".btn-success").removeAttr("disabled");
|
||||
console.log(chrome.extension.getBackgroundPage());
|
||||
$(".btn-success").attr("href", chrome.extension.getBackgroundPage().prevSite);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "MAD - Mindfulness Anti Distraction",
|
||||
"description": "This extension will hopefully help you be less distracted (untested)",
|
||||
"version": "0.1.0.1",
|
||||
"version": "0.1.0.2",
|
||||
"background": {
|
||||
"scripts": ["js/checkerino.js","background.js"],
|
||||
"pages": ["background.html"]
|
||||
|
||||
Reference in New Issue
Block a user