funky fresh!
enchanted-sword / dashboard-unfucker Goto Github PK
View Code? Open in Web Editor NEWunfucks the twitterification of tumblr's dashboard
License: GNU General Public License v3.0
unfucks the twitterification of tumblr's dashboard
License: GNU General Public License v3.0
funky fresh!
title; the script manages scrolling to the next page from the main dash. after a little while the error "Unexpected Application Error!
Node.insertBefore: Child to insert before is not a child of this node" appears. There are other messages, and they all follow the trend of "lu@https://assets.tumblr.com/pop/js/modern/vendor-522962a4.js:22:97411". Not sure if this could be an asset loading error or anything else but yeah.
Old tumblr layout is used to load posts as expected
Old tumblr layout is used, but fails to load posts or recognize that I'm logged in'
I noticed this line of code:
$nav.children(":nth-child(2),:nth-child(10),:nth-child(11),:nth-child(12)").remove();`
Unfortunately, we can't rely on element order here, since (for example) I don't have Tumblr Live muted, so I have an extra button after explore. This means that, for me, this removes the settings menu dropdown, which I assume is unintentional.
I think something like this should work:
$nav.children().has('use[href="#managed-icon__explore"], use["href="#managed-icon__live-video"], use[href="#managed-icon__shop"]', use[href="#managed-icon__earth"]).remove();
I can't finish this myself, since I don't have the "get ad-free" icon on my account with the new layout, but I've seen it in screenshots and I assume that's one you probably want to hide!
hello! would it be possible to change the DMs layout to the old one? i haven't seen anyone talk about it but i got an update for them (both mobile and desktop) and it looks like twitter too. i hate it. i miss the old dms. thank you
For users with accounts new enough to have the "for you" tab as the default (i.e. those made after May 8th, 2023), it's pretty important to be able to access the "following" tab to actually be able to use your dash, so while I don't really know how to do options in a user script it seems important to allow that particular element hide to be disabled in some way!
(Also, I personally use it for the "blog subs" tab, so even though I don't have a new account it's a must have for me.)
What it says on the tin.
After three or four posts or so, the places where an avatar should be are left blank. They aren't merely still loading in either, and it's not because one user posts multiple things one after another that the website doesn't care to load in the avatar multiple times.
In this image, the buttons are missing:
While in this image, the content isn't centered, like I remember it being. The version I downloaded was 3.2.1 at first, so I went to update it because I noticed the option, but it provided similar results. This seems to be what happens most of the time. (I'd prefer it if there was more content presented per row too, but I imagine that's harder to do.)
I have "hide recommended blogs" unchecked, but otherwise I haven't messed with it at all.
For original posts by me and posts by users that I am following (that have not been reblogged by people I am following), their floating icons do not show up.
The resource at “https://assets.tumblr.com/pop/src/assets/fonts/favorit/favorit-medium-fbc7316f.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. dragongirlsnout
The resource at “https://assets.tumblr.com/pop/src/assets/fonts/favorit/favorit-85-cf2f6136.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. dragongirlsnout
Content-Security-Policy: Ignoring “'unsafe-inline'” within script-src: nonce-source or hash-source specified dragongirlsnout
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content.js:64:422
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content.js:65:165
Loading failed for the <script> with source “https://s0.wp.com/wp-content/js/bilmur.min.js?m=202333&f=3”. dragongirlsnout:344:3
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://assets.tumblr.com/pop/js/modern/sentry-579c304a.js. (Reason: CORS request did not succeed). Status code: (null).
See screenshot below. This is the second page of the dashboard (endless scrolling turned off). Every post is missing the profile picture and there is a 'Follow' button next to every username.
macOS 13.5
Firefox 116.0.3
Tampermonkey 4.19.0
Script version 3.2.3
XKit Rewritten 0.21.15
Note: only applies to version A
Fairly self-explanatory but um. Just in case, here's an image of the exact thing we're talking about. Checked, and it was not the result of Stylus or some other extension, so... No idea what that's all about?
It's very selective, as sometimes the gap will be present, but sometimes it'll fix itself... And then un-fix itself a few reloads later. Just kinda refresh a bunch and it should crop up eventually.
On version v3.3.0a, the legacy editor is brought back on reblogged posts, but I can't get it to work when making new posts. I've switched the box on and off and reloaded multiple times. I am using Firefox.
Hello! I just installed Version B of your dashboard unfucker, and it works great aside from one small thing. Every time I refresh the page, or close Tumblr and open it in a new tab, all of my chosen settings have been reset (despite all of the boxes I checked off remaining as such) and all of the stuff I chose to hide, like Tumblr live, the shop, etc., just show up all over again. Thank you so much, and have a great rest of your day!
controls whether the unread post count appears on the home navlink
Take this with a grain of salt, as I could only test this by commenting a bunch of code (my account that has the "for you" tab as the default doesn't have the vertical navigation layout). But:
timelineOptionsItemWrapper
probably renders a bit late and thus might need a waitFor
like the search box.navigate()
firing from a non-default dashboard tab, like if you intentionally go to https://www.tumblr.com/dashboard/hubs to see posts from your tracked tags. It probably should only override the current location if the user is on the default dashboard. (I used if (['/dashboard', '/'].includes(location.pathname)) { }
in one of my user scripts: basically just a shortened form of your compare
code using some cool array and window.location builtins!)The first three posts on my dash have icons and reblog chain information, and all posts after that are missing those. I saw the previous profile picture issue, which I also have, and appears to coincide with this bug in that posts with profile pictures have reblog chains and posts without pfps do not.
If I click the header of the post and go to the blog, the reblog chain will show up.
this happens in both versions of the script (version A 3.2.4 and version B 3.2.2)
title, it turns out the node thing from my earlier issue was from me leaving and re-entering fullscreen on firefox. for convience the error is "Unexpected Application Error!
Node.removeChild: The node to be removed is not a child of this node". I can work around for the time being but it is kinda annoying to have to do
on firefox, any version of the script after 1.3 just does not work for me. they install, but nothing gets changed- dash remains on the sidebar, all the layout is the same. i've tried clearing the cache, turning off all my other extensions, and both, to no avail.
Can't see the icons of the blogs I follow that are on my dash, which is a new tumblr feature on the new dash
I observe that on the initial page load, the legacy XKit button is sometimes missing from the header, and when one soft navigates anywhere, it appears but doesn't do anything when clicked. (The legacy XKit code is kind of poorly written and tries to add the click handler using $("#xkit_button")
, but if this userscript runs first and doesn't result in a DOM structure XKit recognizes, the button doesn't get inserted and then $("#xkit_button")
matches nothing).
This should be easy to solve: as per https://github.com/new-xkit/XKit/blob/master/Extensions/xkit_preferences.js#L88-L103 (which I wrote, as it happens), either there needs to be a <nav>
element somewhere in the header that this script makes so that the vertical nav layout code gets triggered, or there needs to be a <header>
element and all of the buttons need a translated menuContainer
class so the classic layout code gets triggered. My guess is the first one is easier.
Essentially no benefit to this one, but now that there's a place to put CSS with selectors, the mouseenter/mouseleave handlers should be replaceable with a style rule and another one with :hover
!
i'm using waterfox and a 1920x1080 monitor if that helps
Whenever I try to navigate to any page on tumblr, or even just hitting the home button to refresh the dashboard, the page blanks out and shows the following text:
Unexpected Application Error!
Permission denied to access object
21669/tY/<@https://assets.tumblr.com/pop/js/modern/main-dd027c03.js:87:639
21669/tX/<@https://assets.tumblr.com/pop/js/modern/main-dd027c03.js:87:3297
46306/n/<@https://assets.tumblr.com/pop/js/modern/main-dd027c03.js:129:328875
sn@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:96138
lh@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:114163
s9@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:108341
ib@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:47327
s7@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:108716
eU@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:15845
nR@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:39706
tJ@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:24057
tY@https://assets.tumblr.com/pop/js/modern/vendor-a23415fc.js:22:23839
okay my issue is hard to describe with words so im gonna attach a gif and a photo and say what the issue is as it comes up. the following gif is what tumblr looks like upon reload
as you can see, it briefly loads the correct layout of the old dashboard, and then changes it into a wide version shortly after. is this a bug, or is this wide version the intended result?
image above depicts the correct layout of the old dash. thanks ✌️
I've turned off everything else so that only the unfucker is running on my browser (latest chrome-) and while using dark mode on the dash and going to make a new text post, the new text window is white, Not grey. when I remove un-fucker, it works as normal - (but I cant cope with the new dash, lol-)
i noticed clicking on a message in my messages list won't actually cause the message to open (whether i have the message redesign enabled or disabled, and whether i'm using the current or reverted dashboard layout). it's only when i click on someone's icon/url to open their blog in dashboard view (tumblr.com/username) that the message window pops up. when i close the blog, the message window disappears as well. messages work normally when i disable tampermonkey.
Basically the title. As you scroll down on desktop, the avatars don't move with you.
Hello there, I've been using this script for a while but I think there should be a room for improvement for the following reasons.
If you recurse through PeeprRoute.initialTimeline, the only thing that causes flagged posts not to show up when browsing someone's blog or looking directly at a URL is a "isNsfw: true" key being set on the specific post. Here's a barebones preview of what you'd have to do to change this — don't add this version, though. The proper way to do it would be to actually parse the initialTimeline object and check specifically on post objects instead of blindly checking every object down the tree for 'isNsfw'.
const updateObject = (old) => {
let copy = JSON.parse(JSON.stringify(old));
//console.log(copy)
for (let i in old) {
if (typeof old[i] === "object") {
copy[i] = updateObject(copy[i]);
} else if (typeof old[i] === "array") {
copy[i] = copy[i].map(x=>typeof x === "object"?updateObject(x):x)
} else {
if(i==='isNsfw') copy['isNsfw'] = false;
}
}
return copy;
};
Object.defineProperty(window, "___INITIAL_STATE___", { // thanks twilight-sparkle-irl!
set(x) {
state = x;
},
get() {
try {
return {
...state,
PeeprRoute: updateObject(state.PeeprRoute),
obfuscatedFeatures: modifyObfuscatedFeatures(state.obfuscatedFeatures, featureSet)
};
} catch (e) {
console.error("Failed to modify features", e);
}
It's worth noting that this doesn't work that well and it's probably worth doing some other way, because if you change views it stops being "initial timeline," but I wanted to document that it's possible somewhere.
Likely because of the new tweaks to the sub-navigation menu, the 990px hard crash is once again an issue. I'm currently not sure how to rearrange the menu items without triggering the crash.
Screenshots of poll and title not being visible with dashboard-unfucker turned on, and then visible with it turned off:
Nothing else changed, just deactivated and reloaded. on reactivating and reloading it was gone again.
FF developer edition 117b9 on Win10, with XKit Rewritten.
OP url of poll https://www.tumblr.com/honeylemony/725412032931889152/how-long-does-it-take-you-to-naturally-fall-asleep
Apparently the search bar loads in way later than the rest of the page? No clue why; it's not like it has to get loaded from a server. But because of this, when I refresh, sometimes the search bar is still in the sidebar instead of in the header.
Could probably solve this with another waiting loop; one can do like:
const waitFor = async selector => {
let retries = 0;
while (retries++ < 25 && !$(selector).length) {
await new Promise(requestAnimationFrame);
}
}
Or, if one wishes to have the code after using this function never run if it never finds the element in question (this code is probably slightly harder to understand to a reader not familiar with new Promise()
):
// recursive
const waitFor = (selector, retried = 0) => new Promise(resolve => {
$(selector).length
? resolve()
: retried < 25 && requestAnimationFrame(() => waitFor(selector, retried + 1));
});
// not recursive
const waitFor = (selector) => new Promise(async resolve => {
for (let i = 0; i < 25; i++) {
if ($(selector).length) {
resolve();
break;
}
await new Promise(requestAnimationFrame);
}
});
(I didn't test these snippets; might have typos. Also, the number 25 is completely arbitrary. I put in a counter and saw a single-digit number of requestAnimationFrame
loops before the search bar appeared.)
This bar you use to access the seperate dashboards and... whatever settings menu that manage gives you is entirely inacessible with dashboard unfucker.
Since some are still on default for you for some reason, and others who like having access to followed tags, this bar should probably be moved or reimplemented somehow.
This is very minor and not a huge issue, but I scroll by hotkeys regularly and having the top of a post cut off is a mild annoyance.
I've noticed that sometimes when I or someone else on my dash reblog a post, the username of the person reblogged from doesn't show up in the header of the post. This only really happens when the post is reblogged either directly from the original post or from whoever made the last reblog with text. I can't tell if this is an intentional feature or a glitch, but either way it's a bit buggy, since even if the username doesn't appear, if you aren't following whoever the post was reblogged from, the "Follow" button still shows up.
I'm running this on Firefox under Greasemonkey. When I try and use the script, I get this error in the dev console:
ReferenceError: tumblr is not defined
Clicking where Firefox says the error is coming from (just labelled as "sandbox eval context"), I see it's coming from here. Any idea how to fix this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.