purify quora.com with vanilla javascript

  |   Source

"Smart" http://quora.com always recommends the stories I hate to see.

So here is my way to toggle the stories display on Chrome and Firefox.

Step 1, create a new bookmark with below link,

javascript:a=Array.from(document.getElementsByClassName("AnswerStoryToggleModal"));a.forEach(function(e){e.style.display=a[a.length-1].style.display==='none'?'block':'none';});

Step 2, DONE! You only need click the bookmark to hide or show the stories when visiting http://quora.com.

Here is the original vanilla javascript,

var a = Array.from(document.getElementsByClassName("AnswerStoryToggleModal"));
a.forEach(function (e) {
    // check 'display' of the last item in story feed before toggling
    e.style.display = a[a.length - 1].style.display === 'none' ? 'block' : 'none';
});

Screenshot:

purify-quora-nq8.png

Comments powered by Disqus