转跳到内容

排行榜

热门内容

显示于 2024年04月06日 在所有范围中最高声望的内容

  1. 好像成功了用浅薄的js编程能力写了个油猴脚本 把代码放出来好了(js大佬轻喷) // ==UserScript== // @name SS同盟积分计算 // @namespace https://sstm.moe/profile/ // @version 1.0 // @description 简单计算积分 // @author FuRobert // @match *://sstm.moe/profile/* // @icon https://www.google.com/s2/favicons?sz=64&domain=sstm.moe // @grant none // ==/UserScript== (function() { 'use strict'; let is_ok = false; function calculator(){ let nei_rong_shu = 0; let jie_cao_shu = 0; let fu_yuan_shu = 0; var nei_rong_shu_box = document.getElementsByClassName("ipsType_minorHeading"); for(let i=0; i<3;i++ ){ let temp_text = nei_rong_shu_box[i].parentElement.innerText; if(temp_text.includes(',')){ temp_text=temp_text.replace(',',""); } if(temp_text.includes('内容数')){ nei_rong_shu = parseInt(temp_text.replace('内容数\n',"")); console.log(nei_rong_shu); break; } } var jie_cao_shu_box = document.getElementsByClassName("ipsDataItem_main"); if (jie_cao_shu_box[0] != null){ for(let i=0; i<5;i++ ){ let temp_text = jie_cao_shu_box[i].textContent; if(temp_text.includes(',')){ temp_text=temp_text.replace(',',""); } if(temp_text.includes('J')){ jie_cao_shu = parseInt(temp_text.replace('J',"")); console.log(jie_cao_shu); break; } } for(let i=0; i<5;i++ ){ let temp_text = jie_cao_shu_box[i].textContent; if(temp_text.includes(',')){ temp_text=temp_text.replace(',',""); } if(temp_text.includes('F')){ fu_yuan_shu = parseInt(temp_text.replace('F',"")); console.log(fu_yuan_shu); break; } } var box = document.getElementsByClassName("ipsDataList ipsDataList_reducedSpacing cProfileFields")[1]; var temp_box = box.children[0].cloneNode(true); temp_box.children[0].children[0].innerHTML='积分'; temp_box.children[1].innerHTML = String((nei_rong_shu*0.3 + jie_cao_shu*0.03 + fu_yuan_shu*10).toFixed(2)); box.append(temp_box); jie_cao_shu_box = document.getElementsByClassName("ipsDataItem_generic ipsDataItem_size3 ipsType_break"); for (let temp of jie_cao_shu_box){ console.log(temp.textContent); if(temp.textContent.includes('积分')){ is_ok = true; return; } } }else{ if(is_ok == false){ setTimeout(start, 200); } return; } } function start(){ if(is_ok == false){ setTimeout(calculator, 200); } } window.onload=function(){ start(); }; })(); 要使用的话,安装油猴插件,在里面选择添加新插件,把代码都复制进去然后启用应该就好了() 不过只是在我这边用着看起来挺正常,别人用不知道怎么样,手机端应该不行,要是哪天个人页面更新了点什么改了下布局可能就失效了 -----------------分割线----------------- 感谢 @367ddd 大佬给的修改建议,现在对于千位以上带逗号(如1,000)的数值会自动去掉逗号了
    3
  2. 大香蕉 神经,害得我笑了一天 又粗又大(陶喆并感)
    2
  3. 我的代码技术实际上只是刚入门)感谢打赏 不过也确实,我忽略了千位以上的问题 现在已经把 @367ddd 大佬的修改代码加进去了,修改后应该没问题了
    1
  4. 那是一个原因啦,不过更多原因是这几天感冒嗓子有点沙哑 只要找到适合的观赏方式就能理解它的抽象
    1
  5. 似有。你看她头上那漂亮的外展饰毛也满蝴蝶犬了吧。 我比较在意的是🐶🐱她们在最后一集之后要怎么和主角过往后的日子...
    1
  6. 看之前没想这么多,看完之后就后悔了,也没遇到过番剧偷跑这种情况
    0
排行榜设为 上海/GMT+08:00
×
×
  • 新建...

重要消息

为使您更好地使用该站点,请仔细阅读以下内容: 使用条款