mirror of
https://github.com/wassname/mad.git
synced 2026-07-24 13:10:43 +08:00
cleanup duty! small changes
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
<p id="target"></p>
|
||||
</blockquote>
|
||||
<textarea id="input" class="form-control" rows="3"></textarea>
|
||||
<p id="charCount"></p>
|
||||
<p id="original"></p>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
|
||||
@@ -2,3 +2,12 @@ body{
|
||||
font-family:
|
||||
'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
(function () {
|
||||
function ready() {
|
||||
if(!document.getElementById('matchu-pomodoro-extension-overlay')) {
|
||||
var overlay = document.createElement('div'), lines = [
|
||||
chrome.i18n.getMessage("site_blocked_info"),
|
||||
chrome.i18n.getMessage("site_blocked_motivator")
|
||||
], p, img = document.createElement('img');
|
||||
overlay.id = 'matchu-pomodoro-extension-overlay';
|
||||
overlay.style.position = 'fixed';
|
||||
overlay.style.left = 0;
|
||||
overlay.style.top = 0;
|
||||
overlay.style.width = '100%';
|
||||
overlay.style.height = '100%';
|
||||
overlay.style.zIndex = 9000001;
|
||||
overlay.style.backgroundImage = '-webkit-linear-gradient(bottom, #ccc 0%, #fff 75%)';
|
||||
overlay.style.padding = '5em 1em 1em';
|
||||
overlay.style.textAlign = 'center';
|
||||
overlay.style.color = '#000';
|
||||
overlay.style.font = 'normal normal normal 16px/1 sans-serif';
|
||||
|
||||
img.src = chrome.extension.getURL('icons/work_full.png');
|
||||
img.style.marginBottom = '1em';
|
||||
overlay.appendChild(img);
|
||||
|
||||
for(var i in lines) {
|
||||
p = document.createElement('p');
|
||||
p.innerText = lines[i];
|
||||
p.style.margin = '0 0 .5em 0';
|
||||
overlay.appendChild(p);
|
||||
}
|
||||
document.body.appendChild(overlay);
|
||||
}
|
||||
}
|
||||
|
||||
if(typeof document === 'undefined') {
|
||||
window.addEventListener("DOMContentLoaded", ready);
|
||||
} else {
|
||||
ready();
|
||||
}
|
||||
})();
|
||||
@@ -1,13 +0,0 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
||||
@@ -1,4 +0,0 @@
|
||||
(function () {
|
||||
var overlay = document.getElementById('matchu-pomodoro-extension-overlay');
|
||||
document.body.removeChild(overlay);
|
||||
})();
|
||||
+2
-4
@@ -34,11 +34,8 @@ window.onload = function setupUpdater(){
|
||||
var score = a.get(newText)[0][0];
|
||||
if (score>0.91) {
|
||||
passed = true;
|
||||
set(orig, "YOU WON");
|
||||
return;
|
||||
}
|
||||
set(count, 'Debug: You entered '+newText.length+' characters.');
|
||||
set(orig, 'Debug: Score:' + score);
|
||||
}
|
||||
|
||||
function eventHandler(){
|
||||
@@ -48,10 +45,11 @@ window.onload = function setupUpdater(){
|
||||
input.onkeydown=input.onkeyup=onClick=eventHandler;
|
||||
};
|
||||
|
||||
//Button Listener function
|
||||
//Button Listener function yeah yeah its jquery and the rest of this wasnt, I am learning!
|
||||
$(function(){
|
||||
$(".btn-primary").click(function(){
|
||||
if (passed){
|
||||
$("strong").text("I hope you don't regret this");
|
||||
$(".btn-success").removeAttr("disabled");
|
||||
console.log(chrome.extension.getBackgroundPage());
|
||||
$(".btn-success").attr("href", chrome.extension.getBackgroundPage().prevSite);
|
||||
|
||||
Reference in New Issue
Block a user