Compare commits

..

2 Commits

Author SHA1 Message Date
blankie ea2571b756
Update Image Loader Placeholder Remover description 2023-07-31 15:52:05 +10:00
blankie 099f0ae1f9
Update Compass QoL Enhancer to 1.3.0
- Mark files and folders as clickable for Link Hints
- Fix "crash" on panels without tabs
2023-07-31 15:48:24 +10:00
2 changed files with 22 additions and 5 deletions

View File

@ -2,7 +2,7 @@
// @name Compass QoL Enhancer
// @namespace blankie-scripts
// @match http*://*.compass.education/*
// @version 1.2.1
// @version 1.3.0
// @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
// @inject-into page
@ -79,6 +79,14 @@ function handleNewNode(node) {
for (let i = 0; i < panel.items.items.length; i++) {
handlePanelItem(panel, panel.items.items[i], i === 0, tabToOpen);
}
} else if (node.closest("[id^='wikibrowserpanel-'], #CompassWidgetsWikiBrowserPanel")) {
// Make files and folders in wiki/resources clickable for Link Hints
if (node.localName === "td") {
node.setAttribute("role", "button");
}
for (let expander of node.querySelectorAll("td, .x-tree-expander")) {
expander.setAttribute("role", "button");
}
}
}
@ -155,6 +163,11 @@ function handlePanelItem(panel, panelItem, isDefault, tabToOpen) {
}, 1000);
}
// /Communicate/SchoolDocumentation.aspx does not have tabs
if (!panelItem.tab) {
return;
}
panelItem.tab.preventDefault = false;
panelItem.tab.el.dom.href = panelItemHash;

View File

@ -20,13 +20,17 @@ Hacky script to disable the client-side file limit per tab
A userscript that adds small but useful features for Compass. Features include:
- The ability to close windows by clicking on the background
- Calendar events are now links (they work with [Link Hints](https://lydell.github.io/LinkHints/)
now! you can also ctrl+click on "standard classes" and learning tasks)
- Calendar events are now links (they work with [Link Hints] now! you can also
ctrl+click on "standard classes" and learning tasks)
- Tabs are now links (you can refresh pages and the tab will automatically
open. you can also ctrl+click on them)
- Files and folders in Resources is now marked clickable ([Link Hints] can now
open them!)
- The context menu that only says "Copy" is now suppressed
- The option to remember logins is unchecked by default
[Link Hints]: https://lydell.github.io/LinkHints/
## Elements with ID lister
A userscript that adds a "Show elements popup" option to the Monkey Menu which
@ -34,8 +38,8 @@ lists all elements with an ID
## Image Loader Placeholder Remover
Removes image loading placeholders from https://closertoday.co.uk,
https://www.indiatoday.in, and https://www.vice.com (article only).
Removes image loading placeholders from images loaded via Javascript, such as
https://closeronline.co.uk, https://wired.com, and https://knowyourmeme.com.
## nightly.link buttons