Skip to content

Instantly share code, notes, and snippets.

View nbriz's full-sized avatar

Nick Briz nbriz

View GitHub Profile
@nbriz
nbriz / gist:973c46f7bb60c919da03
Last active August 29, 2015 14:03
removePost.js
$('span').each(function( i ) {
if( $(this).html() == 'Report'){ $(this).click(); }
if( $(this).html() == 'Report/Remove Tag'){ $(this).click(); }
if( $(this).html() == 'Remove Tag...'){ $(this).click(); }
if( $(this).html() == 'Delete This Photo'){ $(this).click(); }
if( $(this).html() == 'Delete'){ $(this).click(); }
if( $(this).html() == 'Delete...'){ $(this).click(); }
if( $(this).html() == 'Unlike'){ $(this).click(); }
});
@nbriz
nbriz / gist:144b81a8e97f88f3fc69
Last active August 29, 2015 14:03
loadActivityMen.js
var edit = $('.uiPopover > a');
for (var i = 0; i < edit.length; i++) { edit[i].click(); };
@nbriz
nbriz / gist:618d0c8e60154ec1c3bc
Created June 30, 2014 06:06
leaveGroupConfirm.js
$('button').each(function( i ) {
if( $(this).html() == 'Leave Group'){ $(this).click(); }
});
$('span').each(function( i ) {
if( $(this).html() == 'Leave Group'){
$(this).click();
}
});
@nbriz
nbriz / gist:c488f979faf48d4834f2
Last active August 29, 2015 14:03
clickAllUntag.js
$( "input[name|='untag']" ).click();
@nbriz
nbriz / gist:46db7bf9a439bc874ed1
Last active February 27, 2018 15:46
onlyLargePhotos.js
var imgHTML = [];
var imgs = document.querySelectorAll(".fbPhotoStarGridElement");
imgs.forEach((el, i)=>{
imgHTML.push('<img src="'+el.getAttribute('data-starred-src')+'">');
});
document.body.innerHTML = imgHTML;
@nbriz
nbriz / gist:a953329e41afaef392d0
Last active February 27, 2018 15:38
quickscroll.js
var pheight = 0;
function quickScroll(){
if(pheight < document.height){
pheight = document.height;
window.scrollBy(0, document.height);
setTimeout(quickScroll, 500); // adjust incase ajax is slow
}
}quickScroll();
@nbriz
nbriz / divRave.js
Last active March 15, 2023 18:05
just for fun :)
// PASTE THIS IN YOUR CONSOLE ( worx best in chrome )
// `~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~
// chrome console: OPTION + COMMAND + J
// firefox console: OPTION + COMMAND + K
// `~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~
// WARNING FLASHING LIGHTS!!!!
setInterval(function(){
d=document.getElementsByTagName('div');
for(i=0; i<d.length; i++) {
@nbriz
nbriz / gist:9601714
Last active August 29, 2015 13:57
mobile/desktop index redirect php
<?php
if( preg_match('/iphone|android/i', $_SERVER['HTTP_USER_AGENT']) ) {
include('index-mobile.html');
}
else {
include('index-desktop.html');
}
?>
@nbriz
nbriz / BBsnakeLogo.js
Created May 9, 2013 15:56
playing w/canvas >> logo/snake generative animation
/* Author: Branger_Briz
....***....
dXXXXXXXXXXXXXXXb
dXXXXXXXXXXXXXXXXXXb.
,dXXXXXXXXXXXXXXXXXXXXXb.
dXXXXXXXXXXXXXXXXXXXXXXXXb.
^ 9XXXP"`V```~VVVVV~''V''dXXXP ^
dX\ . )XP )XXX( 9XP . /XP
9X\/\ |XP .9X^XXP \P /\/\XXP
9X \XP' __/XP/\XXX\___ 9/X/ XXP'