realityfabric / Tumblr-Batch-Block

Mass blocking made easy
GNU Affero General Public License v3.0
7 stars 6 forks source link

Suggestion: Syncing block lists across blogs #2

Closed realityfabric closed 2 years ago

realityfabric commented 7 years ago

Suggested by Pugugly001 on the app's Chrome Store support page:

Automatically syncing sub-blog block lists with the main blog. Unfortunately the tumblr phone app doesn't actually allow you to block from any blog but your main blog. If this system could sync anyone blocked in your main blog to sub blogs without copying, pasting and editing in notepad, then individually updating subblogs, that would be wonderful.

realityfabric commented 7 years ago

I started looking into it this morning, and I found the selector for blocked blogs to be

jQuery('#blocked_blogs > div.accordion_content.show > ul > li:nth-child(1) > div.blog-info > a.name')[0].innerText

where li:nt-child(1) can be incremented for each (1 being the most recently blocked, incrementing towards the least recently blocked).

I'll need to fiddle with it, but I think it should be pretty easy to collect an entire blocklist and export it to a format that can simply be pasted back into the app.

realityfabric commented 7 years ago

I'll be able to reuse the openBlockList() function to expand the list (which will be necessary to grab all of the names from the list).

realityfabric commented 7 years ago

Commit 8255b4e3422ab1e2ba5ceb368620b521a3183d61 makes it so that you can export the blocklist. I don't know if it will be possible to automatically synchronize blocklists across blogs, but this gets us a few steps closer.