UL Shuffler

Shuffles li's in UL's

// ==UserScript==
// @name UL Shuffler
// @description Shuffles li's in UL's
// @author ShareDVI
// @license MIT
// @version 1.0
// @include http://*
// @include https://*
// @namespace https://gf.qytechs.cn/users/13692
// ==/UserScript==
(function (window, undefined) {  
    var w;
    if (typeof unsafeWindow != undefined) {
        w = unsafeWindow
    } else {
        w = window;
    }
	
    if (w.self != w.top) {
        return;
    }

	var ul = document.querySelectorAll('ul');
	for (var j = 0; j<ul.length; j++) {
		for (var i = ul[j].children.length; i >= 0; i--) {
			ul[j].appendChild(ul[j].children[Math.random() * i | 0]);
		}
	}
		
})(window);

QingJ © 2025

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