Greasy Fork is available in English.

Tumblr Savior

Saves you from ever having to see another post about certain things ever again (idea by bjornstar, rewritten by Vindicar).

< Tumblr Saviorについてのフィードバック

レート:良 – スクリプトは良好に動作する

§
投稿日: 2014/08/17
編集日: 2014/08/24

Still doesn't block Sponsored posts

That's about it.

Now fixed, thanks!

Vindicar作者
§
投稿日: 2014/08/18

I haven't noticed anything like that, but the test cases are hard to come by - Tumblr doesn't throw sponsored posts at me often. Newer versions have checkboxes for sponsored and recommended posts, please make sure you have that one enabled. If it is, could you please save a page with unblocked sponsored post so I could take a good look at it?

§
投稿日: 2014/08/21

Attached is the HTML for a sponsored post that showed up while I had the checkboxes enabled. I emailed you the full page, also.

§
投稿日: 2014/08/21

I think the problem was the use of cloneInto. Apparently, in my version of Firefox ( Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20140319 Firefox/24.0 Iceweasel/24.4.0 ) that call causes the whole script to stop, silently. Replacing it with a plain assignment seems to solve the problem.

I also noticed a few other minor issues:

line 140: this.blackList should be rules.blackList (same with the other console.log lines).

line 194: the call to hidePost should have a reason attached (therefore, the two if clauses should be separated, so recommended and sponsored blocking can be separated).

Thanks for your work!

Vindicar作者
§
投稿日: 2014/08/21
編集日: 2014/08/21

>>Firefox/24.0
Ah, I got it now. You see, in Firefox 30 (or was it 31?) they set more strict sandboxing rules, which was followed by Greasemonkey 2.0 release. Now you must explicitly export (via cloneInto() and exportFunction()) everything you want to access from the page scope. So I've rewritten my scripts to accommodate for that - and thus broke the compatibility with older versions of Firefox/Greasemonkey.

I've updated the script to add a placeholder functions for cloneInto() and exportFunction() if necessary.
Please tell if it works fine for you, and thank you for the information and effort in debugging!

UPD: I skipped your other advices, though. Both are referring to 'debug only' bits of code I really should've snipped out of the script, sorry!

§
投稿日: 2014/08/23

I know they were commented out -- I un-commented them *for* debugging, then had to figure out why they bork the script. :-)

§
投稿日: 2014/08/23

Thanks, the updated version does seem to work. I would encourage you to fix the debugging bits, and leave them un-commented (maybe behind a global DEBUG flag, if you don't want to clog up the console). If you'd like a patch (or pull request if the code is online somewhere), I'm glad to provide one.

Vindicar作者
§
投稿日: 2014/08/24
編集日: 2014/08/24

I'll think about it, Jesse. Thanks. =)
Meanwhile, mind changing topic icon to green now that the issue is resolved?

UPD: rolled out 2.6.3 with tidied up code, plus stopwords are now saved in the post DOM node, so it should be easier to find why something is (not) blocked.

§
投稿日: 2014/08/24

Sorry, I hadn't realized I could do that. Done now. Thanks for all your work.

§
投稿日: 2014/08/25

And it's broken again. The workaround doesn't work -- but ifdef'ing the one use of cloneInto *does*. Let me know when/if you've updated the script, and I'll try it again. Sorry for all the trouble.

Vindicar作者
§
投稿日: 2014/08/25

Updated.

§
投稿日: 2014/08/26

It appears to be working now. Thanks for the prompt update!

A possible additional feature would be to allow graylisting of sponsored and recommended posts, rather than only blacklisting them. Particularly for recommended, I might want to see them sometimes, but not always. If that sounds interesting, I may try and code up a patch.

Vindicar作者
§
投稿日: 2014/08/26

Check out version 2.7 - it worked for me. The only thing is that it hides recommended posts in the same way as graylisted ones - blog name and tags will still be visible.
And thanks for the idea!

返信を投稿

返信を投稿するにはログインしてください。