clean up directory structure

This commit is contained in:
2026-08-21 09:28:12 +02:00
parent f45bdc542d
commit edb533f3f8
14 changed files with 0 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
// ==UserScript==
// @name DuckDuckGo Tab Title
// @namespace http://tampermonkey.net/
// @version 2
// @updateURL https://github.com/luxick/scripts/raw/master/duckduckgo.user.js
// @downloadURL https://github.com/luxick/scripts/raw/master/duckduckgo.user.js
// @description Sets the title of the tab when using the POST method for searching
// @author luxick
// @match https://duckduckgo.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=duckduckgo.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(updateTitle, 1000);
// Your code here...
})();
function updateTitle(){
document.title = document.getElementById("search_form_input").value + " - Search";
}
+63
View File
@@ -0,0 +1,63 @@
// ==UserScript==
// @name Inline Reddit images and Comment Redirect
// @namespace https://www.reddit.com
// @version 2025-09-24
// @description Embed images posted as comments and redirect post links to comments
// @author luxick
// @updateURL https://git.luxick.de/luxick/scripts/raw/branch/master/reddit-image-inline.user.js
// @downloadURL https://git.luxick.de/luxick/scripts/raw/branch/master/reddit-image-inline.user.js
// @match https://old.reddit.com/r/*
// @match https://www.reddit.com/r/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Handle image inlining
let xpath = "//a[text()='<image>']";
var element;
var result = document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
let links = [];
while(element = result.iterateNext()){
if (element.href) {
links.push(element);
}
}
for (var elem of links) {
console.log("inlining image " + elem.href);
let image = new Image();
image.src = elem.href;
image.style = "max-width: 300px";
// Create a new anchor element
let anchor = document.createElement('a');
anchor.href = elem.href;
anchor.target = '_blank'; // Opens in new tab
// Append the image to the anchor
anchor.appendChild(image);
// Add the anchor (containing the image) to the parent
elem.parentElement.appendChild(anchor);
elem.remove();
}
// Only proceed with link rewriting if we're not already in a comments section
if (!window.location.pathname.includes('/comments/')) {
// Handle post link redirection
const postLinks = document.querySelectorAll('a.title');
postLinks.forEach(link => {
// Find the comments link for this post
const thing = link.closest('.thing');
if (thing) {
const commentsLink = thing.querySelector('a.comments');
if (commentsLink) {
link.href = commentsLink.href;
}
}
});
}
})();
+82
View File
@@ -0,0 +1,82 @@
// ==UserScript==
// @name Wahapedia Enhanced Search
// @namespace http://tampermonkey.net/
// @version 2025-09-24
// @description Enhances Wahapedia with Kagi image search and Warhammer.com search
// @author luxick
// @updateURL https://git.luxick.de/luxick/scripts/raw/branch/master/whapedia-image-redirect.user.js
// @downloadURL https://git.luxick.de/luxick/scripts/raw/branch/master/whapedia-image-redirect.user.js
// @match https://wahapedia.ru/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to replace Google image search URLs with Kagi
function replaceImageSearchUrls() {
// Find all links on the page
const links = document.getElementsByTagName('a');
for (let link of links) {
// Check if the link is a Google image search URL
if (link.href.startsWith('https://www.google.com/search')) {
// Replace with Kagi image search
link.href = link.href.replace('https://www.google.com/search', 'https://kagi.com/images');
}
}
}
// Function to create a Warhammer.com search button
function createButton(modelName) {
const warhammerButton = document.createElement('a');
warhammerButton.href = `https://www.warhammer.com/en-gb/plp?search=${encodeURIComponent(modelName)}`;
warhammerButton.className = 'dsButton';
warhammerButton.target = '_blank';
const buttonDiv = document.createElement('div');
buttonDiv.className = 'tooltip picSearch';
warhammerButton.appendChild(buttonDiv);
warhammerButton.style.marginLeft = '5px';
warhammerButton.style.display = 'inline-block';
return warhammerButton;
}
function addWarhammerSearchButtons() {
// Get all model name containers
const headerContainers = document.querySelectorAll('.dsH2Header');
if (!headerContainers.length) return;
headerContainers.forEach(headerContainer => {
const modelName = headerContainer.firstElementChild.textContent.trim();
if (!modelName) return;
const narrowContainer = headerContainer.querySelector('.dsIconsNarrow');
if (narrowContainer) {
narrowContainer.appendChild(createButton(modelName));
}
const wideContainer = headerContainer.querySelector('.dsIconsWide');
if (wideContainer) {
wideContainer.appendChild(createButton(modelName));
}
});
}
// Initial run of both functions
replaceImageSearchUrls();
addWarhammerSearchButtons();
// Set up observer for dynamically loaded content
const observer = new MutationObserver(() => {
replaceImageSearchUrls();
});
observer.observe(document.body, {
childList: true,
subtree: true
});
})();