Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ziphirum's full-sized avatar
🏠

Petzh ziphirum

🏠
View GitHub Profile
var run = function(){
var clickBlock = function(){
$('.answers li').each(function(key, e){
var a = $(e).css('background-color').replace(/\s/g, "");
var b = $('h3').text().replace(/\s/g, "");
if (a == b) $(e).click();
$('.button.first').click()
});
}
setInterval(clickBlock, 10);
var run = function(){
$('button').first().click();
var clickBlock = function(){
$('#box span').click();
}
setInterval(clickBlock, 10);
}
@ziphirum
ziphirum / gist:4b29128b251af5260aed
Created January 28, 2015 17:27
Change pantip background color
$('body, .main-post, .display-post-wrapper-inner').css('background','#333');
/*เบียร์ 1 ขวด=2 บาท
2 ฝา แลกได้ 1 ขวด
4 ขวด แลกได้ 1ขวด
มี 20 บาท กินได้กี่ขวด(???)
*/
var cal = function(bottle, cap, money){
if (money < 2 && cap < 2 && bottle < 4) {
return 0;
}
@ziphirum
ziphirum / Color run picker
Last active August 29, 2015 14:05
Script for run on this site : http://colorrun.pl/
function run(){
function cal(rgb){
var color = 0;
for(var i=0 ; i<3 ; i++){
color = color + eval(rgb[i]);
}
return color;
}
@ziphirum
ziphirum / String.startsWith
Created August 6, 2014 15:07
Check string startWith
if (typeof String.prototype.startsWith != 'function') {
String.prototype.startsWith = function (str){
return this.lastIndexOf(str, 0) === 0
};
}