// ==UserScript== // @name 阿里云开发者社区自动签到 // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.1.4 // @description 首页是https://developer.aliyun.com/mission,登录账号,点击触发即可 // @author You // @match https://developer.aliyun.com/* // ==/UserScript== window.onload = function () { window.setTimeout(function(){ if (isURL("https://developer.aliyun.com/live/")) { jump('https://developer.aliyun.com/',1); } if (isURL1("https://developer.aliyun.com/")) { jump('https://developer.aliyun.com/iot/',1); } if (isURL1("https://developer.aliyun.com/iot/")) { jump('https://developer.aliyun.com/storage/',1); } if (isURL1("https://developer.aliyun.com/storage/")) { jump('https://developer.aliyun.com/ecs/',1); } if (isURL1("https://developer.aliyun.com/ecs/")) { jump('https://developer.aliyun.com/database/',1); } if (isURL1("https://developer.aliyun.com/database/")) { jump('https://developer.aliyun.com/group/aliyun_linux/',1); } if (isURL1("https://developer.aliyun.com/group/aliyun_linux/")) { jump('https://developer.aliyun.com/group/viapi/',1); } if (isURL1("https://developer.aliyun.com/group/viapi/")) { jump('https://developer.aliyun.com/bigdata/',1); } if (isURL1("https://developer.aliyun.com/bigdata/")) { jump('https://developer.aliyun.com/cloudnative/',1); } if (isURL1("https://developer.aliyun.com/cloudnative/")) { jump('https://developer.aliyun.com/computenest/',1); } if (isURL1("https://developer.aliyun.com/computenest/")) { jump('https://developer.aliyun.com/yitian/',1); } if (isURL1("https://developer.aliyun.com/yitian/")) { jump('https://developer.aliyun.com/group/networking/',1); } if (isURL1("https://developer.aliyun.com/group/networking/")) { jump('https://developer.aliyun.com/group/yunxiao/',1); } if (isURL1("https://developer.aliyun.com/group/yunxiao/")) { jump('https://developer.aliyun.com/polardb/',1); } if (isURL1("https://developer.aliyun.com/polardb/")) { jump('https://developer.aliyun.com/modelscope/',1); } if (isURL1("https://developer.aliyun.com/modelscope/")) { jumpArticle(); } if (isURL("https://developer.aliyun.com/article")) { jump('https://developer.aliyun.com/topic/writer2024',1); } if (isURL("https://developer.aliyun.com/topic/writer2024")) { jump('https://developer.aliyun.com/topic/aigc_pai/paintingagent?taskCode=16430&recordId=64c535c0066ecd5b1d25259da41752a3',1); } if (isURL("https://developer.aliyun.com/topic/aigc_pai/paintingagent")) { jump('https://developer.aliyun.com/score',1); } if (isURL("https://developer.aliyun.com/topic/writer2024")) { window.setTimeout(function(){ window.setTimeout(function(){ document.getElementsByClassName('more-btn')[0].click(); },getRandomInt(2000,3000)); window.setTimeout(function(){ document.querySelector('[data-object-id="1516482"]').click(); },getRandomInt(5000,6000)); window.setTimeout(function(){ document.querySelector('[data-object-id="1516482"]').click(); },getRandomInt(7000,8000)); window.setTimeout(function(){ document.querySelector('[data-object-id="1516482"]').click(); },getRandomInt(9000,10000)); },getRandomInt(2000,4000)); } if (isURL("https://developer.aliyun.com/mission")) { tt(); } if (isURL("https://developer.aliyun.com")) { qd(); } if (isURL("https://developer.aliyun.com/article")) { window.setTimeout(function(){ document.getElementsByClassName('btn-item btn-share')[0].click(); },getRandomInt(2000,4000)); } },getRandomInt(800,1500)); }; function createBtn(name){ // 创建一个div元素作为悬浮按钮 var floatingButton = document.createElement("div1"); floatingButton.style.width = "50px"; // 设置按钮宽度 floatingButton.style.height = "30px"; // 设置按钮高度 floatingButton.style.background = "#ff0000"; // 设置背景色(红色) floatingButton.style.borderRadius = "25%"; // 设置边界半径使得按钮变成圆形 floatingButton.style.position = "fixed"; // 设置定位为固定 floatingButton.style.top = "140px"; // 设置与屏幕底部的间距 floatingButton.style.right = "50px"; // 设置与屏幕右侧的间距 // 创建一个span元素来包含按钮的文字 var buttonText = document.createElement("span"); buttonText.textContent = name; // 设置按钮上的文字 buttonText.style.color = "white"; // 设置文字颜色 buttonText.style.fontSize = "16px"; // 设置文字大小 // 将文字添加到按钮中 floatingButton.appendChild(buttonText); // 将按钮添加到文档中 document.body.appendChild(floatingButton); } function tt() { // 创建一个div元素作为悬浮按钮 var floatingButton = document.createElement("div"); floatingButton.style.width = "50px"; // 设置按钮宽度 floatingButton.style.height = "30px"; // 设置按钮高度 floatingButton.style.background = "#ff0000"; // 设置背景色(红色) floatingButton.style.borderRadius = "25%"; // 设置边界半径使得按钮变成圆形 floatingButton.style.position = "fixed"; // 设置定位为固定 floatingButton.style.top = "150px"; // 设置与屏幕底部的间距 floatingButton.style.right = "10px"; // 设置与屏幕右侧的间距 // 创建一个span元素来包含按钮的文字 var buttonText = document.createElement("span"); buttonText.textContent = "触发"; // 设置按钮上的文字 buttonText.style.color = "white"; // 设置文字颜色 buttonText.style.fontSize = "16px"; // 设置文字大小 // 将文字添加到按钮中 floatingButton.appendChild(buttonText); // 点击按钮时触发事件 floatingButton.addEventListener("click", function() { var num = getRandomInt(0,15); if(num==0){ jump('https://developer.aliyun.com/live/252532/',1) } if(num==1){ jump('https://developer.aliyun.com/live/253919/',1) } if(num==2){ jump('https://developer.aliyun.com/live/252870/',1) } if(num==3){ jump('https://developer.aliyun.com/live/252745/',1) } if(num==4){ jump('https://developer.aliyun.com/live/252492/',1) } if(num==5){ jump('https://developer.aliyun.com/live/252212/',1) } if(num==6){ jump('https://developer.aliyun.com/live/252319/',1) } if(num==7){ jump('https://developer.aliyun.com/live/252015/',1) } if(num==8){ jump('https://developer.aliyun.com/live/253882/',1) } if(num==9){ jump('https://developer.aliyun.com/live/253704/',1) } if(num==10){ jump('https://developer.aliyun.com/live/253689/',1) } if(num==11){ jump('https://developer.aliyun.com/live/253866/',1) } if(num==12){ jump('https://developer.aliyun.com/live/252611/',1) } if(num==13){ jump('https://developer.aliyun.com/live/252849/',1) } if(num==14){ jump('https://developer.aliyun.com/live/251963/',1) } if(num==15){ jump('https://developer.aliyun.com/live/253675/',1) } }); // 将按钮添加到文档中 document.body.appendChild(floatingButton); } function jumpArticle(){ var num = getRandomInt(0,15); if(num==0){ jump('https://developer.aliyun.com/article/1441642/',1); } if(num==1){ jump('https://developer.aliyun.com/article/1442106/',1); } if(num==2){ jump('https://developer.aliyun.com/article/1443042/',1); } if(num==3){ jump('https://developer.aliyun.com/article/1445969/',1); } if(num==4){ jump('https://developer.aliyun.com/article/1436465/',1); } if(num==5){ jump('https://developer.aliyun.com/article/1450496/',1); } if(num==6){ jump('https://developer.aliyun.com/article/1455339/',1); } if(num==7){ jump('https://developer.aliyun.com/article/1444881/',1); } if(num==8){ jump('https://developer.aliyun.com/article/1453142/',1); } if(num==9){ jump('https://developer.aliyun.com/article/1444885/',1); } if(num==10){ jump('https://developer.aliyun.com/article/1444883/',1); } if(num==11){ jump('https://developer.aliyun.com/article/1477960/',1); } if(num==12){ jump('https://developer.aliyun.com/article/1485492/',1); } if(num==13){ jump('https://developer.aliyun.com/article/1483298/',1); } if(num==14){ jump('https://developer.aliyun.com/article/1485634/',1); } if(num==15){ jump('https://developer.aliyun.com/article/1486527/',1); } } function jump(url1,index){ window.setTimeout(function(){ window.open(url1); },getRandomInt(1000,2000)); } function qd() { if(isURL("https://developer.aliyun.com/topic/writer2024")){ return; } window.setTimeout(function(){ document.getElementsByClassName('user-sign-day-box-num')[0].click(); document.getElementsByClassName('unlogin user-sign-day-box active')[0].click(); },getRandomInt(2000,5000)); } function isURL1(x) { return window.location.href==x; } function isURL(x) { return window.location.href.indexOf(x) != -1; } function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }