Redirect userstyles.org to uso.kkx.one (UserStyles.org Archive)

Makes userstyles.org actually usable

目前为 2022-09-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         Redirect userstyles.org to uso.kkx.one (UserStyles.org Archive)
// @namespace    https://gf.qytechs.cn/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}

}

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址