Created
February 2, 2012 03:36
-
-
Save alecgorge/1721264 to your computer and use it in GitHub Desktop.
fix the terrible calc chat ui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var a=loadSolution,b=!1,c=function(){b||(b=$("#loader-img")),b.show()},d=function(){b.hide()};loadSolution=function(){c(),a.apply(null,arguments)},$("#book-content-center,#book-content-right,#bottom-toolbar").remove(),$("#left-content-container,#book-content-left").css({width:"auto",height:"auto","float":"none",display:"block",overflow:"visible"}),$("<button>Next Problem</button>").click(function(){return $("#selExercises")[0].selectedIndex++,loadSolution(),!1}).appendTo($("#toolbar")),$("<button>Previous Problem</button>").click(function(){return $("#selExercises")[0].selectedIndex--,loadSolution(),!1}).appendTo($("#toolbar")),$("<span></span>").attr("id","loader-img").html(" Loading...").hide().appendTo($("#toolbar")),$("#solutionimg").load(d)})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var old = loadSolution | |
, loader = false | |
, showLoader = function () { | |
if(!loader) { | |
loader = $('#loader-img'); | |
} | |
loader.show(); | |
} | |
, hideLoader = function () { | |
loader.hide(); | |
}; | |
loadSolution = function () { | |
showLoader(); | |
old.apply(null, arguments); | |
}; | |
$('#book-content-center,#book-content-right,#bottom-toolbar').remove(); | |
$('#left-content-container,#book-content-left').css({width:'auto',height:'auto',float:'none',display:'block',overflow:'visible'}); | |
$('<button>Next Problem</button>').click(function () { | |
$('#selExercises')[0].selectedIndex++; | |
loadSolution(); | |
return false; | |
}).appendTo($('#toolbar')); | |
$('<button>Previous Problem</button>').click(function () { | |
$('#selExercises')[0].selectedIndex--; | |
loadSolution(); | |
return false; | |
}).appendTo($('#toolbar')); | |
$('<span></span>') | |
.attr('id', 'loader-img') | |
.html(" Loading...") | |
.hide() | |
.appendTo($('#toolbar')); | |
$('#solutionimg').load(hideLoader); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment