Compare commits

..

No commits in common. "8d5abf9a30591bf293a3385113ed245a365f131a" and "50db62f7f569264eb04247bbf190697916d5371a" have entirely different histories.

3 changed files with 2 additions and 85 deletions

View File

@ -2,7 +2,7 @@
// @name Compass QoL Enhancer // @name Compass QoL Enhancer
// @namespace blankie-scripts // @namespace blankie-scripts
// @match http*://*.compass.education/* // @match http*://*.compass.education/*
// @version 1.24.4 // @version 1.24.3
// @author blankie // @author blankie
// @description A userscript that adds small but useful features for Compass, such as the ability to close windows by clicking on the background // @description A userscript that adds small but useful features for Compass, such as the ability to close windows by clicking on the background
// @inject-into page // @inject-into page
@ -415,7 +415,7 @@ function handleNewCalendarEvent(element, calendar) {
let finishString = unsafeWindow.Ext.util.Format.date(calendarData.finish, unsafeWindow.Compass.TIME_NO_PERIOD_FORMAT); let finishString = unsafeWindow.Ext.util.Format.date(calendarData.finish, unsafeWindow.Compass.TIME_NO_PERIOD_FORMAT);
let textElement = a.querySelector(".ext-evt-bd") || a; let textElement = a.querySelector(".ext-evt-bd") || a;
// yes, innerHTML. longTitleWithoutTime can apparently contain HTML. lets hope that startString and finishString don't // yes, innerHTML. longTitleWithoutTime can apparently contain HTML. lets hope that startString and finishString don't
if (textElement.innerHTML.startsWith(`${startString}: `)) { if (textElement.innerHTML === `${startString}: ${calendarData.longTitleWithoutTime}`) {
textElement.innerHTML = `${startString} - ${finishString}: ${calendarData.longTitleWithoutTime}`; textElement.innerHTML = `${startString} - ${finishString}: ${calendarData.longTitleWithoutTime}`;
} }

View File

@ -101,10 +101,6 @@ build logs to view them without logging in
![A man yelling "I DON'T WANNA", followed by sign up/login boxes](https://gitlab.com/blankX/userscripts/-/raw/master/accounts.jpg) ![A man yelling "I DON'T WANNA", followed by sign up/login boxes](https://gitlab.com/blankX/userscripts/-/raw/master/accounts.jpg)
## Tumblr Unnagger
A script that removes several login/account walls on Tumblr
## Wayback Machine Toolbar Toggler ## Wayback Machine Toolbar Toggler
A userscript that replaces the "close this toolbar" button with one that lets A userscript that replaces the "close this toolbar" button with one that lets

View File

@ -1,79 +0,0 @@
// ==UserScript==
// @name Tumblr Unnagger
// @namespace blankie-scripts
// @match https://*.tumblr.com/*
// @grant GM_addStyle
// @version 1.0.0
// @author blankie
// @description Removes login nags
// @inject-into content
// @run-at document-end
// ==/UserScript==
"use strict";
let css = `
/* Remove the "Sign up" and "Follow <blog>" buttons */
.sign-up-button, .follow-button {
display: none !important;
}
/* Remove the top iframe bar on the default theme (e.g. https://azulcrescent.tumblr.com/) */
.tmblr-iframe {
display: none !important;
}
/* Fix margin from the top iframe bar being hidden */
.nav-wrapper.nav-fixed {
top: 0;
}
/* Hide fullscreen nag when scrolling */
#glass-container {
display: none;
}
/* Restore scrolling when fullscreen nag is shown */
html {
overflow: scroll !important;
}
`;
if (/^\/archive(\/.*)?$/.test(window.location.pathname)) {
css += `
/* Remove the "It's time to try Tumblr" nag on /archive */
#base-container > div:has(style) > div:nth-child(4) {
display: none;
}
`;
}
GM_addStyle(css);
function removeLoginWall(element) {
element.removeAttribute("data-login-wall-type");
for (let child of element.querySelectorAll("[data-login-wall-type]")) {
child.removeAttribute("data-login-wall-type");
}
}
// Remove login walls for elements before Javascript
removeLoginWall(document.body);
// Remove login walls for elements added by Javascript
let observer = new MutationObserver(function(mutations) {
for (let mutation of mutations) {
if (mutation.type !== "childList") {
continue;
}
for (let node of mutation.addedNodes) {
if (node.nodeType !== 1) {
continue;
}
removeLoginWall(node);
}
}
});
observer.observe(document.body, {childList: true, subtree: true});