Skip to content

Instantly share code, notes, and snippets.

@Adman
Adman / ddg - 0clickinfo gadget
Created March 28, 2012 16:22
query function isn't performed
var query = function(query, callback)
{
var req = new XMLHttpRequest();
if(this.meanings)
req.open('GET', 'https://chrome.duckduckgo.com?q=' + encodeURIComponent(query) + '&format=json', true);
@Adman
Adman / goals
Created February 27, 2012 17:15
missing }
var goal1 = 0;
var goal2 = 0;
window.scaling1 = 0;
window.scaling2 = 0;
function toggleOnGoal()
{
btnStart = document.getElementById("btnStart");
if (btnStart.innerHTML == "Pause"){
if (window.halftime == 1 && minutes >= window.newMins / 2){
if (seconds >= window.newSecs / 2){
$("#time").stopwatch().stopwatch('stop');
toggleHalf();
window.halftime = 2;
return;
}
}
if (window.halftime == 2 && minutes >= window.newMins){