restructure + GH userscript
parent
f98322e8ca
commit
5d60df5607
|
@ -1,5 +1,4 @@
|
|||
# LinkedIn Profile Viewers Viewer
|
||||
# Userscript Collection
|
||||
|
||||
|
||||
Userscript that allows you to see who recently viewed your profile without buying premium - tested and used on [ViolentMonkey](https://violentmonkey.github.io/), but should work with any userscript manager
|
||||
|
||||
Side note, if nothing shows up then try reloading the `/me/profile-views` page until it works lol
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# GitHub Distractionless
|
||||
|
||||
Userscript that makes sure that GitHub stays a work tool and doesn't turn into a social media website.
|
|
@ -0,0 +1,74 @@
|
|||
// ==UserScript==
|
||||
// @name GitHub Distractionless
|
||||
// @namespace Violentmonkey Scripts
|
||||
// @match https://github.com/
|
||||
// @grant none
|
||||
// @version 0.1
|
||||
// @author turtlebasket
|
||||
// @website https://github.com/turtlebasket/userscripts/tree/master/github-distractionless
|
||||
// @description 2/9/2023, 4:24:34 PM
|
||||
// @run-at document-start
|
||||
// ==/UserScript==
|
||||
|
||||
let hideEls = [];
|
||||
let focusing = false;
|
||||
|
||||
// title bar links - custom behavior for now
|
||||
const titleBarExclude = ["Explore", "Marketplace", "Codespaces"];
|
||||
let titleBarEls = document.getElementsByClassName("js-selected-navigation-item")
|
||||
for (let i = 0; i < titleBarEls.length; i++) {
|
||||
let el = titleBarEls[i];
|
||||
if (titleBarExclude.includes(el.innerHTML.trim())) {
|
||||
console.log(el.innerHTML);
|
||||
hideEls.push(el);
|
||||
}
|
||||
}
|
||||
|
||||
// general exclusion list
|
||||
|
||||
[
|
||||
["mail-status unread", [0], /.*/],
|
||||
["UnderlineNav-item", [1], /^\/$/],
|
||||
]
|
||||
.forEach(([className, hideIndices, pageRegex]) => {
|
||||
hideIndices.forEach(i => {
|
||||
let el = document.getElementsByClassName(className)[i];
|
||||
if (typeof el === 'undefined') {
|
||||
console.log(`focus mode: unable to find element ${className} [ ${i} ]`)
|
||||
}
|
||||
else {
|
||||
hideEls.push(el);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// hide all els in els
|
||||
function toggleFocus() {
|
||||
focusing = !focusing;
|
||||
for (let el of hideEls) {
|
||||
el.setAttribute(
|
||||
"style",
|
||||
focusing ? "display: none;" : "display: auto;");
|
||||
}
|
||||
}
|
||||
|
||||
// initial state
|
||||
toggleFocus();
|
||||
|
||||
// toggle switch
|
||||
// NOTE: WIP, currently bugged due to github content policy. add later
|
||||
|
||||
// const btnStyle = `
|
||||
// background-color: black;
|
||||
// foreground-color: white;
|
||||
// borde-color: white;
|
||||
// border-width: 1px;
|
||||
// margin-left: 4px;
|
||||
// padding: 2px 4px;
|
||||
// font-size: 12pt;`;
|
||||
// const focusModeSwitch = document.createElement("button");
|
||||
// focusModeSwitch.setAttribute("innerText", `Focus: ${focusing ? "on" : "off"}`);
|
||||
// focusModeSwitch.setAttribute("style", btnStyle);
|
||||
// focusModeSwitch.setAttribute("onclick", toggleFocus)
|
||||
// document.getElementsByClassName("Header js-details-container Details")[0]
|
||||
// .appendChild(focusModeSwitch);
|
|
@ -0,0 +1,9 @@
|
|||
# LinkedIn Profile Viewers Viewer
|
||||
|
||||
Userscript that allows you to see who recently viewed your profile without buying premium - tested and used on [ViolentMonkey](https://violentmonkey.github.io/), but should work with any userscript manager
|
||||
|
||||
Side note, if nothing shows up then try reloading the `/me/profile-views` page until it works lol
|
||||
|
||||
## ⚠️ NOTE: CURRENTLY BROKEN
|
||||
|
||||
As of a few months ago, it seems that LinkedIn no longer accidentally leaks info about blurred viewers in the profile view. There doesn't seem to be any other workaround I'm aware of :(
|
Loading…
Reference in New Issue