Initial commit

This commit is contained in:
2014-05-08 14:47:12 +01:00
commit c12b7f4613
88 changed files with 14567 additions and 0 deletions

7
httpdocs/config.src/main-min.js vendored Normal file
View File

@@ -0,0 +1,7 @@
document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,!1);new form},!1);
var form=function(){this.el={bgcolour:document.getElementById("bgcolour"),notify:document.getElementById("notify"),flick:document.getElementById("flick"),update:document.getElementById("update"),submit:document.getElementById("submit"),apikey:document.getElementById("apikey"),save:document.getElementById("save")};this.config=this.getConfig();this.updateForm();this.attach()};
form.prototype.getConfig=function(){var a=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=RegExp("[\\?&]"+a+"=([^&#]*)").exec(location.search);return null==a?"":decodeURIComponent(a[1].replace(/\+/g," "))},b={};b.apikey=a("apikey");b.update=a("update");b.dark="true"==a("dark")?!0:!1;b.notify="true"==a("notify")?!0:!1;b.flick="true"==a("flick")?!0:!1;return b};
form.prototype.updateForm=function(){0<this.config.apikey.length&&(this.el.apikey.value=this.config.apikey);0<this.config.update.length&&(this.el.update.value=this.config.update);this.config.dark?(this.el.bgcolour.className="black",this.el.bgcolour.children[0].innerHTML="BLACK"):(this.el.bgcolour.className="white",this.el.bgcolour.children[0].innerHTML="WHITE");this.config.notify?(this.el.notify.className="on",this.el.notify.children[0].innerHTML="ON"):(this.el.notify.className="off",this.el.notify.children[0].innerHTML=
"OFF");this.config.flick?(this.el.flick.className="on",this.el.flick.children[0].innerHTML="ON"):(this.el.flick.className="off",this.el.flick.children[0].innerHTML="OFF")};
form.prototype.attach=function(){var a=this;this.el.bgcolour.addEventListener("click",function(b){b.preventDefault();a.config.dark=!a.config.dark;a.updateForm()});this.el.notify.addEventListener("click",function(b){b.preventDefault();a.config.notify=!a.config.notify;a.updateForm()});this.el.flick.addEventListener("click",function(b){b.preventDefault();a.config.flick=!a.config.flick;a.updateForm()});this.el.update.addEventListener("change",function(){a.config.update=this.value});this.el.apikey.addEventListener("change",
function(){a.config.apikey=this.value});this.el.save.addEventListener("click",function(b){b.preventDefault();b="pebblejs://close#"+encodeURIComponent(JSON.stringify(a.config));window.location.href=b})};