Skip to content

Instantly share code, notes, and snippets.

View marcjulianschwarz's full-sized avatar
🕶️

Marc Julian Schwarz marcjulianschwarz

🕶️
View GitHub Profile
@marcjulianschwarz
marcjulianschwarz / obsidian-web-clipper-and-copy-url.js
Created September 17, 2023 20:40
Obsidian Web Clipper and Keyboard Shortcut to Copy the Current URL - PageExtender
function createFilename() {
let domainName = location.href.split("://")[1].split("/")[0].replace("www.", "");
let pageTitle = document.title;
let filename = pageTitle;
let cleanName = filename.replace(/[\(\)\[\]\\/?%*:'|"<>!]/g, "-");
return cleanName;
}
function showPopup(msg) {
let popup = document.createElement("div");
@marcjulianschwarz
marcjulianschwarz / github-old-dashboard.js
Last active September 22, 2023 13:30
Bring back the old GitHub dashboard with PageExtender for Safari
if (window.location.hostname === "github.com") {
const feedContent = document.querySelector('.feed-content')
if (feedContent){
const feedMain = document.querySelector('.feed-main')
feedContent.style.maxWidth = "unset"
feedMain.style.maxWidth = "1200px"
fetch('https://github.com/dashboard-feed')
.then(response => response.text())
.then(text => {