领带骑士 发表于 2023-5-2 02:12:19

【时岁旅程-中古世纪】我的勋章排序 专治赠礼勋章打乱顺序

本帖最后由 领带骑士 于 2023-5-2 17:36 编辑

使用的勋章统计数据来自xaj老师的这个帖子:
统计已有勋章种类

使用方法:
1:f12控制台输入代码执行
2:随便更改一下某个勋章的位置,即可成功排序(第二步不能略)



let youxi=["杰夫‧莫罗","克里斯·雷德菲尔德","疾风剑豪","光之战士","艾吉奥","一丝不挂克里斯","凯登‧阿兰科","果体76","尼克斯·乌尔里克","岛田半藏","内森·德雷克","卡洛斯·奥利维拉","诺克提斯·路西斯·伽拉姆","文森特‧瓦伦丁","炙热的格拉迪欧拉斯","竹村五郎","沃特·沙利文","里昂·S·甘乃迪","亚瑟·摩根","萨菲罗斯","岛田源氏","BIG BOSS","夏日的泰凯斯","Dante","库伦(起源)","康纳","哈尔·乔丹","英普瑞斯","乔纳森·里德","Doc","杰克·莫里森/士兵 76","维吉尔","皮尔斯‧尼凡斯","杰西·麦克雷","泰比里厄斯","Vergil","普隆普特·阿金塔姆","桐生一马","格拉迪欧拉斯","亚当‧简森","铁牛","黑墙","安杜因·乌瑞恩","阿尔伯特·威斯克","V (DMC5)","汉克/Hank","希德‧海温特","巴尔弗雷亚","肥皂","士官长","豹王","阿列克西欧斯","莱因哈特·威尔海姆","幻象","加勒特·霍克","不灭狂雷-沃利贝尔","泰凯斯·芬得利","陷阱杀手","Scott Ryder","詹姆斯·维加","阿尔萨斯·米奈希尔","盖拉斯‧瓦卡瑞安","法卡斯","库伦(审判)","【新手友好】昆進","鬼王酒吞童子","维克多·天火","蛮族战士","奥伦","吉姆‧雷诺","但丁","威尔卡斯","亚力斯塔尔","艾德尔"]
let zhenren=["托尼·史塔克","Joker","克里斯·埃文斯","魯杰羅·弗雷迪","虎克船长","安德森‧戴维斯","索尔·奥丁森","擎天柱","麦迪文(Medivh)","西弗勒斯·斯内普","神灯","索林·橡木盾","阿拉贡","乔治·迈克尔","魔术师奥斯卡","杰森·斯坦森","小天狼星·布莱克","阿不思·邓布利多","甘道夫","博伊卡","马克·史贝特","史蒂文·格兰特","亚瑟·库瑞","巴基 (猎鹰与冬兵)","克苏鲁","异形","卢西亚诺‧科斯塔","罗宾·西克","超人","罗伯‧史塔克","蓝礼·拜拉席恩","卡德加","吉姆·霍普","大古","黑豹","莱托·厄崔迪","Drover","三角头","布莱恩·欧康纳","迪恩‧温彻斯特","山姆‧温彻斯特","丹尼尔·纽曼","迈克尔迈尔斯","金刚狼","Chris Mazdzer","瑟兰迪尔","威克多尔·克鲁姆","大黄蜂","安德鲁·库珀","丹·安博尔","塞巴斯蒂安·斯坦","莱戈拉斯","奥利弗‧奎恩","盖里","汤姆·赫兰德","Frank (LBF)","詹米·多南","羅素·托維","藤田優馬","康纳‧沃什","巴特·贝克","戴尔·芭芭拉","猫化弩哥","卡斯迪奥","史蒂夫‧金克斯","戴蒙‧萨尔瓦托","尼克·贝特曼","尤利西斯"]
let maid=["莫瑞甘","贝优妮塔","莎伦","绯红女巫","赫敏·格兰杰","梅格"]
let equip=["武士之魂","布衣","赫尔墨斯·看守者之杖","男用贞操带","圣英灵秘银甲","石鬼面","巴啦啦小魔仙棒","贤者头盔","符文披风","星芒戒指","骑士遗盔","恩惠护符","十字叶章","超级无敌幸运辉石","蔷薇骑士之刃","守望者勋章","狩猎用小刀","刺杀者匕首","琉璃玉坠","月陨戒指","日荒戒指","神圣十字章","艾尔尤因","冒险专用绳索","十字军护盾","力量腕带","药剂背袋","物理学圣剑","眼镜蛇图腾","海盗弯钩","钢铁勇士弯刀","猎鹰图腾","山猫图腾","重磅手环","新月护符","龙血之斧","生锈的海盗刀枪","念念往日士官盔","超级名贵无用宝剑","嗜血斩首斧","变形软泥","净化手杖"]
let asset=["雪王的心脏","沙漠神灯","SCP-s-1889","梦中的列车","婴儿泪之瓶","幽灵竹筒","羽毛笔","老旧怀表","海潮之歌","冒险用指南针","勇者与龙之书","这是一片丛林","漂洋小船","圣甲虫秘典","充满魔力的种子","奇怪的紫水晶","锻造卷轴","流失之椅","知识大典","德拉克魂匣","宝箱内的球","暖心小火柴","神秘的邀请函","红石","秘密空瓶","GHOST","冒险用面包","深红矿土","海螺号角","冒险用宝箱","木柴堆","章鱼小丸子","种植土豆","冒险用绷带","预知水晶球","发芽的种子","魔法石碑","神秘的红茶","夜灯","远古石碑","用过的粪桶","种植菠菜","种植菊花","GM論壇初心者勛章","箭术卷轴","种植小草","One Ring","超级无敌名贵金卡","金钱马车","聚魔花盆","谜之瓶","诺曼底号","社畜专用闹钟","神秘的漂流瓶","史莱姆养殖证书","微笑的面具","心心念念小雪人"]
let pet=["软泥怪蛋","洞窟魔蛋","结晶卵","五彩斑斓的蛋","史莱姆蛋","珊瑚色礁石蛋","GM村金蛋","迷のDoge","黑龙蛋","电磁卵","月影蛋","郁苍卵","熔岩蛋","灵鹫蛋","血鹫蛋","深渊遗物","小阿尔的蛋","幽光彩蛋","青鸾蛋","马戏团灰蛋","万圣彩蛋","林中之蛋","沙漠羽蛋","海边的蛋","暮色卵","血红色的蛋","螺旋纹卵","红龙蛋","腐化龙蛋","漆黑的蝎卵","新手蛋"]
let forum=["达拉然","时间管理局","美恐:启程","男巫之歌","最终幻想XIV","赛博朋克2077","龙腾世纪:审判","荒野大镖客:救赎 II","奥兹大陆","五花八门","TRPG","堕落飨宴","质量效应三部曲","上古卷轴V:天际","雾都血医","恶魔城","生化危机:复仇","街头霸王","模拟人生4","寶可夢 Pokémon","英雄联盟","辐射:新维加斯"]
let skill=["野兽之子","森林羊男","骑兽之子","禽兽扒手","黄色就是俏皮","四季之歌","风雪之家","牧羊人","堕落之舞","男色诱惑","海边的邻居"]
let gift=["送情书","丢肥皂","千杯不醉","灵光补脑剂","遗忘之水","萨赫的蛋糕","神秘商店贵宾卡","变骚喷雾","没有梦想的咸鱼","闪光糖果盒","茉香啤酒"]
let spell=["炼金之心","黑暗交易","水泡术","召唤古代战士","祈祷术","吞噬魂魄","咆哮诅咒","霍格沃茨五日游","石肤术","雷霆晶球","思绪骤聚"]
let plot=["『日心说』","『任天堂Switch』红蓝√","『任天堂Switch』灰黑√","『还乡歌』","『私有海域』","『钜鲸』","『召唤好运的角笛』","『圣洁化身』","『矩阵谜钥Ⓖ』","『新居手册Ⓖ』","『户口本: Lv2-6』","『居住证: Lv7+』"]

function sort(data){
    let myfldiv=document.getElementsByClassName("myfldiv");
    let myblok=document.getElementsByClassName("myblok")//数组
    let numTocheck=myblok.length
    for(let i=0;i<numTocheck;i++){
      let selector=`#medalid_f > div.my_fenlei > div.myfldiv.clearfix.ui-sortable > div:nth-child(${i+1}) > div.myimg > p:nth-child(2) > b`
      let medalName = document.querySelector(selector).innerHTML;
      for(let j=0;j<data.length;j++){
            if(medalName==data){
                myfldiv.appendChild(myblok);
                i--;
                numTocheck--;
                break;
            }
      }
    }
}

sort(gift);
sort(spell);
sort(plot);
sort(youxi);
sort(zhenren);
sort(maid);
sort(equip);
sort(asset);
sort(pet);
sort(forum);
sort(skill);





这个折叠功能好像会吞字,大家还是下载附件复制代码吧= =


今天水了个帖子还以为主题数终于30了,结果没多久就被管理删了,只好再发一个工具贴{:4_104:}
顺序是按勋章分类弄的(其实可以自定义
如果有勋章排序失败,可能是代码里的勋章名字和页面里的勋章名字没对上,
把代码里的勋章名改成页面里的勋章名就好


static/image/hrline/line7.png

加了几个功能:
1.添加prize分类
2.自动设置赠礼咒术勋章为不显示(防过期)
3.按楼里几位的要求,加了对齐功能(为了每次打开页面都生效只能用油猴了,而且为了适应板块勋章,只能全都扩大)
4.可以自定义收藏勋章,放在最前



默认收藏勋章为无,可以自己在脚本里添加

油猴链接:https://greasyfork.org/zh-CN/scr ... -%E5%AF%B9%E9%BD%90


大家的反应好冷淡啊,走过路过可以给个免费追随吗{:6_166:}

千城丶 发表于 2023-5-2 02:15:01

发帖要多多注意版规哦
不然就很容易被吸入惹
感谢楼主的小工具拉

凯诺斯 发表于 2023-5-2 02:23:48

感谢领带的分享,很实用的工具惹不用自己一个个手动的拖动:lol

silencedonkey 发表于 2023-5-2 02:26:37

排序强迫症狂喜系列,这下能更清楚地分类啦

user_login 发表于 2023-5-2 02:28:09

天知 地知 你知 我知

深暗幽狼 发表于 2023-5-2 02:30:19

删除帖子不是真正删除啊……(
还是会累积在主题数的,只是提示因隐私问题而隐藏。
我要是会写那就好了,也能装下13(?

AncL 发表于 2023-5-2 02:40:08

很实用的小工具 感谢楼主分享 and 删除的主题其实也算在主题数里的(

墨燝 发表于 2023-5-2 02:53:30

有没有那种,能自动排的很齐的办法

毛茸茸兽兽 发表于 2023-5-2 02:54:48

挺好的~就是和咱的种类排序顺序不对,对手指.jpg
嘛~还是挺感谢的(๑>ڡ<)☆

黑达克 发表于 2023-5-2 03:04:34

勋章我是从勋章博物馆那边复制的名字,所以有些会没对上orz
检查的时候只注意数据去了,名字这边没怎么关注,总之有配合wowoa老师的帖子在做修正了。

红叶黄花 发表于 2023-5-2 03:14:46

看上去很实用的样子,试试看!

轮回2L 发表于 2023-5-2 03:18:46

好方便的一键整理,孩子再也不用担心背包里的徽章混乱了{:6_188:}

季夏的呆橘 发表于 2023-5-2 05:45:21

{:4_89:}对代码白痴很不友好 建议出个傻白甜攻略

Zeperion 发表于 2023-5-2 05:51:45

真好再也不用手动整理一个一个拖了(开始好奇被删的是什么贴了

chouki 发表于 2023-5-2 06:30:05

看了一下代码,都是咱没有的勋章.....{:6_164:}

alexwang 发表于 2023-5-2 06:36:19

一般我都是拿鼠标拖拽,原来还能这样拖动,学到了

cc簗橗 发表于 2023-5-2 07:09:55

哪个帖子被删掉了:o

Makima 发表于 2023-5-2 08:39:12

黑达克的表一出来,引出几个帖子呢{:6_167:}

majorw 发表于 2023-5-2 09:13:02

能更加方便的查看管理已有勋章,这样需要手动升级的限时赠礼勋章就不会被杂乱地挤在一堆勋章中而被人遗忘{:6_188:}

Nittbone 发表于 2023-5-2 09:20:00

感谢领带老师,跟着领带老师每次的教程学会了很多小技巧呢!
页: [1] 2 3 4
查看完整版本: 【时岁旅程-中古世纪】我的勋章排序 专治赠礼勋章打乱顺序