Makes userstyles.org actually usable
目前為
// ==UserScript==
// @name Redirect userstyles.org to uso.kkx.one (UserStyles.org Archive)
// @namespace https://greasyfork.org/users/124677-pabli
// @version 0.1
// @description Makes userstyles.org actually usable
// @author Pabli
// @license MIT
// @match http*://userstyles.org/*
// @match http*://uso.kkx.one/*
// @run-at document-start
// @icon https://www.google.com/s2/favicons?sz=64&domain=https://uso.kkx.one
// @grant none
// ==/UserScript==
(function() {
'use strict';
if (window.location.hostname == 'userstyles.org') {
let path = window.location.pathname.split('/')
let uso = 'https://uso.kkx.one/'
if (path[3] == 'newest-styles') {location.href = uso + 'browse/styles?sort=created'}
else if (path[3] == 'recently-updated') {location.href = uso + 'browse/styles?sort=updated'}
else if (path[3] == 'editors-choice') {location.href = uso + 'browse/styles?sort=rating'}
else if (path[2] == 'browse' && path[3] == undefined) {location.href = uso + 'browse/styles'}
else if (path[2] == 'browse') {location.href = uso + 'browse/styles?search=%23' + path[3]}
else if (path[1] == 'users') {location.href = uso + 'browse/styles?search=%40' + path[2]}
else if (path[1] == 'categories') {location.href = uso + 'browse/categories'}
else if (path[1] == 'styles') {location.href = uso + 'style/' + path[2]}
else {location.href = uso}
}
})();