Created
May 23, 2013 16:49
-
-
Save barneycarroll/5637534 to your computer and use it in GitHub Desktop.
Read all of HackneyHipsterHate.tumblr.com inline (without having to click through for the posts). Probably works for other tumblrs too.
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
void function(){[].forEach.call(document.querySelectorAll('.read_more'),function(a){var x=new XMLHttpRequest();x.onload=function(){a.outerHTML=this.responseText.split('<!-- more -->')[1].split('<div class="footer')[0]};x.open('get',a.href,true);x.send()})}(); |
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
void function loadAllPosts(){ | |
[].forEach.call(document.querySelectorAll('.read_more'), function ajaxThis(link){ | |
var ajax = new XMLHttpRequest(); | |
ajax.onload = function injectContent(){ | |
link.outerHTML = this.responseText.split('<!-- more -->')[1].split('<div class="footer')[0]; | |
}; | |
ajax.open('get', link.href, true); | |
ajax.send(); | |
}); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment