Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarockx/e089acce5f1141e6efeb to your computer and use it in GitHub Desktop.
Save tarockx/e089acce5f1141e6efeb to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name FineGentleMan(anyone) for GreaseMonkey/TamperMonkey by The_Leaf
// @namespace com.nfohump.theleaf.ignorescript
// @description Give some class to your ignored users' posts.
// @include *://*.nfohump.com/*
// @version 1
// @grant GM_xmlhttpRequest
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// ==/UserScript==
function processPage() {
var posts = $('div[id=userprofile] span[class=postdetails] div[id=userav] i:contains("Ignored")');
posts.each(function () {
var smpost = $(this).parent().closest('tr');
var pcontent = $(smpost).find('div[class=userPost]');
GM_xmlhttpRequest({
method: 'GET',
url: 'http://www.iheartquotes.com/api/v1/random?max_lines=10&source=literature&show_permalink=false&show_source=false',
onload: function (response) {
if(response.status == 200){
$(pcontent).html('<span class="postbody">' + response.responseText.replace(/(?:\r\n|\r|\n)/g, '<br />') + '</span>');
}
}
});
});
}
console.log('Testing');
processPage();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment