Greasy Fork is available in English.
Remove the redirect part and replace google with duckduckgo
// ==UserScript==
// @name Remove RetroAchievements Redirect
// @namespace http://metalsnake.space/
// @version 1.0
// @description Remove the redirect part and replace google with duckduckgo
// @author MetalSnake
// @match *://retroachievements.org/viewtopic*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
// Alle Links auf der Seite abrufen
const links = document.querySelectorAll('a');
links.forEach(link => {
// Überprüfen, ob der Link die Redirect-URL enthält
if (link.href.startsWith('https://retroachievements.org/redirect?url=')) {
// Den Redirect-Teil entfernen
const newUrl = decodeURIComponent(link.href.replace('https://retroachievements.org/redirect?url=', ''));
if (newUrl.startsWith('https://www.google.com/')) {
const newUrlUnGoogle = newUrl.replace('https://www.google.com/search', 'https://duckduckgo.com/');
link.href = newUrlUnGoogle; // Den Link aktualisieren
console.log(newUrlUnGoogle);
}
else{
link.href = newUrl; // Den Link aktualisieren
console.log(newUrl);
}
}
});
})();