Auto somi

자동 복호화/국룰입력/다운(Kiosk, Mega, GoogleDrive, goFile)

当前为 2025-05-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Auto somi
  3. // @name:ko 자동 소미
  4. // @namespace http://tampermonkey.net/
  5. // @description 자동 복호화/국룰입력/다운(Kiosk, Mega, GoogleDrive, goFile)
  6. // @version new 2.7
  7. // @author 김머시기
  8. // @match https://kiosk.ac/c/*
  9. // @match https://kio.ac/c/*
  10. // @match https://kone.gg/*
  11. // @match https://arca.live/b/*
  12. // @match https://mega.nz/*
  13. // @match https://gofile.io/d/*
  14. // @match https://workupload.com/*
  15. // @match https://drive.google.com/file/d/*
  16. // @match https://drive.google.com/drive/folders/*
  17. // @match https://drive.usercontent.google.com/download?id*
  18. // @icon https://lh3.google.com/u/0/d/18OVO7VmnwIuHK6Ke-z7035wKFmMKZ28W=w1854-h959-iv1
  19. // @grant GM.setValue
  20. // @grant GM.getValue
  21. // @require https://openuserjs.org/src/libs/sizzle/GM_config.js
  22. // @grant GM.registerMenuCommand
  23. // @grant GM_registerMenuCommand
  24. // @grant GM_unregisterMenuCommand
  25. // @grant GM_getValue
  26. // @grant GM_setValue
  27. // @license MIT
  28. // @run-at document-end
  29. // ==/UserScript==
  30. 'use strict';
  31. let chkp = [,,,, atob('c29taXNvZnQ=')], Down_Option, PageLoading = [], isT = [,,], MenuID = [null, null], host = document.URL.split('/')[2], npw = [], pw = [atob('c29taXNvZnQ='),atob('MjAyNXNvbWlzb2Z0'),
  32. // =============================== Settings =======================================
  33. // 추가하길 원하는 비밀번호 따옴표 - 쉼표로 구분해서 바로 아래줄에 넣으면 됨 ex) '1234', '2024국룰', '!국룰!'
  34.  
  35. ];
  36. PageLoading[0] = 1000; // 페이지 로딩 시간 조절 (1000당 1초)
  37. Down_Option = 0; // Kiosk 다운로드 옵션 0:Basic, 1:Fast, 2:일괄 다운로드
  38. // ======================================================================================
  39. async function toggleDown(){
  40. isT[0]=!isT[0];
  41. if(!isT[0] && isT[1]){
  42. isT[1]=false;
  43. await GM.setValue('isT[1]', isT[1]);
  44. }
  45. await GM.setValue('isT[0]', isT[0]);
  46. updateDown();
  47. updateTab();
  48. }
  49. async function toggleTab(){
  50. isT[1]=!isT[1];
  51. if(!isT[0] && isT[1]){
  52. isT[0]=true;
  53. await GM.setValue('isT[0]', isT[0]);
  54. }
  55. await GM.setValue('isT[1]', isT[1]);
  56. updateDown();
  57. updateTab();
  58. }
  59. function updateDown(){
  60. if(MenuID[0] !==null)GM_unregisterMenuCommand(MenuID[0]);
  61. MenuID[0]=GM_registerMenuCommand(`자동 다운로드  ${isT[0] ? 'ON' : 'OFF'}`, toggleDown, { autoClose: false, title: `자동 다운로드 ${isT[0] ? '켜짐' : '꺼짐'}`});
  62. }
  63. function updateTab(){
  64. if(MenuID[1] !==null)GM_unregisterMenuCommand(MenuID[1]);
  65. MenuID[1]=GM_registerMenuCommand(`자동 닫기  ${isT[1] ? 'ON' : 'OFF'}`, toggleTab, { autoClose: false, title: `자동 닫기 ${isT[1] ? '켜짐' : '꺼짐'}`});
  66. }
  67. function doDec() {
  68. if (chkp[3] !== chkp[4]) return;
  69.  
  70. let targets = [];
  71.  
  72. if (host === 'arca.live') {
  73. targets = [
  74. document.querySelector('body div.article-body > div.fr-view.article-content'),
  75. ...document.querySelectorAll('div.article-comment#comment, div.article-comment')
  76. ];
  77. } else if (host === 'kone.gg') {
  78. const base = document.querySelector('div.prose.prose-invert');
  79. const comments = document.querySelectorAll('p.text-sm.max-w-xl.whitespace-pre-wrap');
  80. const listItems = document.querySelectorAll('ol.list-decimal li p');
  81. targets = [base, ...comments, ...listItems];
  82. }
  83.  
  84. function dec(target, reg) {
  85. try {
  86. const original = target.innerHTML;
  87. const matches = [...original.matchAll(reg)];
  88. if (matches.length === 0) return;
  89.  
  90. let result = original;
  91. for (const match of matches) {
  92. let encoded = match[0];
  93. let decoded = encoded;
  94. try {
  95. while (!decoded.startsWith('http')) {
  96. decoded = atob(decoded);
  97. }
  98. const linkHTML = `<a href="${decoded}" target="_blank" rel="noreferrer" style="color:#1e90ff; text-decoration:none;">${decoded}</a>`;
  99. result = result.replace(encoded, linkHTML);
  100. } catch (e) {
  101. console.log('복호화 실패:', encoded, e);
  102. }
  103. }
  104. target.innerHTML = result;
  105. } catch (e) {
  106. console.log('dec 함수 에러:', e, target);
  107. }
  108. }
  109.  
  110. for (const target of targets) {
  111. if (!target) continue;
  112. const links = target.querySelectorAll('a');
  113. links.forEach(a => {
  114. a.setAttribute('rel', 'noreferrer');
  115. });
  116.  
  117. dec(target, /aHR0c[0-9A-Za-z+/=]{8,}/g);
  118. dec(target, /YUhSMG[0-9A-Za-z+/=]{8,}/g);
  119. dec(target, /WVVoU[0-9A-Za-z+/=]{8,}/g);
  120. dec(target, /V1ZWb[0-9A-Za-z+/=]{8,}/g);
  121. }
  122.  
  123. setTimeout(doDlsiteContextAware, 100);
  124. }
  125.  
  126.  
  127.  
  128.  
  129. function doDlsiteContextAware() {
  130. let atc;
  131. if (host === 'arca.live') {
  132. atc = document.querySelector('.article-body .article-content');
  133. } else if (host === 'kone.gg') {
  134. atc = document.querySelector('div.prose.prose-invert');
  135. }
  136. if (!atc) return;
  137.  
  138. let titleEl;
  139. if (host === 'arca.live') {
  140. titleEl = document.querySelector('.title-row .title') || document.querySelector('.board-title .title');
  141. } else if (host === 'kone.gg') {
  142. titleEl = [...document.querySelectorAll('h1')].find(el =>
  143. el.textContent?.match(/RJ[0-9]{6,10}/i)
  144. );
  145. }
  146.  
  147. const keywordPattern = /(꺼|거|퍼|RJ|rj|Rj|rJ|VJ|vj|Vj|vJ|DL|dl|Dl|dL)[\s:()\[\]#-]*([0-9]{6,10})/g;
  148. const fullRJPattern = /\b(RJ|rj|Rj|rJ|VJ|vj|Vj|vJ|퍼|꺼|거|DL|dl|Dl|dL)([0-9]{6,10})\b/g;
  149.  
  150. let titleText = '';
  151. if (titleEl?.childNodes) {
  152. titleText = Array.from(titleEl.childNodes)
  153. .map(n => n.textContent.trim())
  154. .join(' ');
  155. }
  156.  
  157. const bodyText = atc.textContent || '';
  158. const fullText = titleText + '\n' + bodyText;
  159.  
  160. const matchList1 = [...fullText.matchAll(keywordPattern)].map(m => ({ prefix: m[1], code: m[2] }));
  161. const matchList2 = [...fullText.matchAll(fullRJPattern)].map(m => ({ prefix: m[1], code: m[2] }));
  162.  
  163. const linkCodes = Array.from(atc.querySelectorAll('a[href]'))
  164. .map(a => {
  165. const match = a.href.match(/(RJ|VJ)([0-9]{6,10})/i);
  166. return match ? { prefix: match[1].toUpperCase(), code: match[2] } : null;
  167. })
  168. .filter(Boolean);
  169.  
  170. const splitNodeMatches = [];
  171. const allNodes = [...atc.querySelectorAll('*')];
  172. const validPrefixes = ['꺼','거','퍼','RJ','rj','Rj','rJ','VJ','vj','Vj','vJ','DL','dl','Dl','dL'];
  173.  
  174. for (const node of allNodes) {
  175. const children = [...node.childNodes];
  176. for (let i = 0; i < children.length - 1; i++) {
  177. const a = children[i], b = children[i + 1];
  178. const aText = (a.textContent || '').replace(/\s+/g, '');
  179. const bText = (b.textContent || '').trim();
  180. if (!/^\d{6,10}$/.test(bText)) continue;
  181. for (const prefix of validPrefixes) {
  182. if (aText.includes(prefix)) {
  183. splitNodeMatches.push({ prefix, code: bText });
  184. break;
  185. }
  186. }
  187. }
  188. }
  189.  
  190. const extraFromTitle = [];
  191. const match = titleText.match(/^[\[]?([0-9]{6,10})[\]]?/);
  192. if (match) extraFromTitle.push({ prefix: 'RJ', code: match[1] });
  193.  
  194. const allCodes = [
  195. ...matchList1,
  196. ...matchList2,
  197. ...linkCodes,
  198. ...splitNodeMatches,
  199. ...extraFromTitle
  200. ];
  201.  
  202. const seen = new Set();
  203. const uniqueCodes = allCodes.filter(({ code }) => {
  204. if (seen.has(code)) return false;
  205. seen.add(code);
  206. return true;
  207. });
  208.  
  209. if (uniqueCodes.length === 1) {
  210. const { code, prefix } = uniqueCodes[0];
  211. if (!code) return;
  212.  
  213. const mappedPrefix = ['vj', 'vJ', 'Vj', 'VJ', '퍼'].includes(prefix.toLowerCase()) ? 'VJ'
  214. : ['rj', 'rJ', 'Rj', 'RJ', '꺼', '거', 'dl', 'dL', 'Dl', 'DL'].includes(prefix.toLowerCase()) ? 'RJ'
  215. : prefix.toUpperCase();
  216.  
  217. const fullCode = `${mappedPrefix}${code}`;
  218. const link = `https://www.dlsite.com/maniax/work/=/product_id/${fullCode}.html`;
  219.  
  220. const existing = atc.querySelector('.dlsite-link-appended');
  221. if (existing) existing.remove();
  222.  
  223. const wrapper = document.createElement('div');
  224. wrapper.className = 'dlsite-link-appended';
  225. wrapper.style.marginTop = '15px';
  226. wrapper.style.padding = '10px 0';
  227. wrapper.style.borderTop = '1px dashed #aaa';
  228.  
  229. const a = document.createElement('a');
  230. a.href = link;
  231. a.target = '_blank';
  232. a.rel = 'noreferrer';
  233. a.textContent = `[DLsite] ${fullCode}`;
  234. a.style.display = 'block';
  235. a.style.marginBottom = '5px';
  236. a.style.color = '#1e90ff';
  237.  
  238. wrapper.appendChild(a);
  239. atc.appendChild(wrapper);
  240. return;
  241. }
  242.  
  243. const combinedPattern = new RegExp(`${keywordPattern.source}|${fullRJPattern.source}`, 'gi');
  244.  
  245. const walk = (node) => {
  246. if (node.nodeType === Node.TEXT_NODE) {
  247. const text = node.textContent;
  248. let lastIndex = 0;
  249. let match;
  250. const frag = document.createDocumentFragment();
  251.  
  252. while ((match = combinedPattern.exec(text)) !== null) {
  253. const before = text.slice(lastIndex, match.index);
  254. const number = match[2] || match[4];
  255. const prefix = (match[1] || match[3] || '').toLowerCase();
  256. const mappedPrefix = ['vj', 'vJ', 'Vj', 'VJ', '퍼'].includes(prefix) ? 'VJ'
  257. : ['rj', 'rJ', 'Rj', 'RJ', '꺼', '거', 'dl', 'dL', 'Dl', 'DL'].includes(prefix) ? 'RJ'
  258. : prefix.toUpperCase();
  259. const fullCode = `${mappedPrefix}${number}`;
  260.  
  261. const a = document.createElement('a');
  262. a.href = `https://www.dlsite.com/maniax/work/=/product_id/${fullCode}.html`;
  263. a.textContent = fullCode;
  264. a.target = '_blank';
  265. a.rel = 'noreferrer';
  266. a.style.color = '#1e90ff';
  267.  
  268. if (before) frag.appendChild(document.createTextNode(before));
  269. frag.appendChild(a);
  270. lastIndex = match.index + match[0].length;
  271. }
  272.  
  273. if (lastIndex < text.length) {
  274. frag.appendChild(document.createTextNode(text.slice(lastIndex)));
  275. }
  276.  
  277. if (frag.childNodes.length > 0) {
  278. node.replaceWith(frag);
  279. }
  280. } else if (
  281. node.nodeType === Node.ELEMENT_NODE &&
  282. !['A', 'SCRIPT', 'STYLE'].includes(node.tagName)
  283. ) {
  284. for (const child of [...node.childNodes]) {
  285. walk(child);
  286. }
  287. }
  288. };
  289.  
  290. walk(atc);
  291. }
  292.  
  293.  
  294.  
  295.  
  296. async function chkPW(){
  297. chkp[3]=await GM.getValue('chkp[3]');
  298. isT[0]=await GM.getValue('isT[0]', true);
  299. isT[1]=await GM.getValue('isT[1]', false);
  300. updateDown();
  301. updateTab();
  302. if(host=='arca.live' || host=='kone.gg'){
  303. if(chkp[3] !=chkp[4]){
  304. const chk=prompt(decodeURI(atob('JUVBJUI1JUFEJUVCJUEzJUIwJUVEJTk5JTk1JUVDJTlEJUI4')));
  305. if(chk?.toLowerCase()==chkp[4]) await GM.setValue('chkp[3]', chkp[4]);
  306. else {
  307. GM.setValue('chkp[3]', false);
  308. alert(decodeURI(atob('JUVBJUI1JUFEJUVCJUEzJUIwJUVDJTlEJUI0JTIwJUVDJTlEJUJDJUVDJUI5JTk4JUVEJTk1JTk4JUVDJUE3JTgwJTIwJUVDJTk1JThBJUVDJThBJUI1JUVCJThCJTg4JUVCJThCJUE0')));
  309. }
  310. }
  311. }
  312. }
  313. async function inputPW() {
  314. let inputElem = document.querySelector(chkp[0]), btnElem = document.querySelector(chkp[1]);
  315.  
  316. const combinedPw = [...new Set([...pw, ...npw])]; // 고정 + 누적 합친 리스트
  317.  
  318. if (chkp[3] == chkp[4]) {
  319. try {
  320. for (let i = 0; i < combinedPw.length; i++) {
  321. if (host == 'kio.ac') {
  322. inputElem.value = combinedPw[i];
  323. inputElem.dispatchEvent(new Event('input', { bubbles: true }));
  324. inputElem.dispatchEvent(new Event('change', { bubbles: true }));
  325. setTimeout(() => { btnElem.click() }, 10);
  326. } else {
  327. inputElem.value = combinedPw[i];
  328. btnElem.click();
  329. }
  330. if (i < combinedPw.length - 1) {
  331. if (combinedPw[i] != null && combinedPw[i] != '') await new Promise(res => setTimeout(res, 800));
  332. } else {
  333. if (isT[0] == true) await setTimeout(DBtn, PageLoading[1]);
  334. }
  335. }
  336. } catch (e) {
  337. await setTimeout(DBtn, PageLoading[1]);
  338. }
  339. }
  340. }
  341.  
  342. async function kioskdone(){
  343. try {
  344. await new Promise(res=> setTimeout(res, 3000));
  345. for(var i=0, jj=0; jj!=1; i++){
  346. console.log(i);
  347. await new Promise(res=> setTimeout(res, 1000));
  348. if(document.querySelector('.flex.flex-row.text-xs.justify-between div:nth-child(2)').innerText=='done'){
  349. console.log(i);
  350. await setTimeout(()=> { window.open('', '_self').close()}, 2000);
  351. jj++;
  352. }
  353. }
  354. } catch(e){ if(isT[1]==true && isT[2]==true)setTimeout(()=> { window.open('', '_self').close()}, 1000); }
  355. }
  356. async function DBtn(){
  357. if(isT[0] !== true) return;
  358. if(host=='mega.nz')await document.querySelector('.mega-button.positive.resume.js-resume-download').click();
  359. try {
  360. let btns = document.querySelectorAll(chkp[2]);
  361. let delayMultiplier = PageLoading[0] + 600;
  362. if(btns.length > 1){
  363. btns.forEach((btn, index) => {
  364. setTimeout(() => { btn.click(); }, index * delayMultiplier);
  365. });
  366. } else if(btns.length === 1){
  367. btns[0].click();
  368. }
  369. if(host=='mega.nz')
  370. await setTimeout(()=> { document.querySelector('.mega-button.large.positive.download.continue-download').click()}, 2000);
  371. if(isT[1]==true && isT[2]==true){
  372. let totalDelay = (btns.length > 1) ? (btns.length * delayMultiplier + 700) : 1300;
  373. if(host=='kiosk.ac'){
  374. setTimeout(()=> { kioskdone(); }, totalDelay);
  375. } else if(host=='kio.ac'){
  376. setTimeout(()=> { window.open('', '_self').close()}, totalDelay+1000);
  377. } else {
  378. setTimeout(()=> { window.open('', '_self').close()}, totalDelay);
  379. }
  380. }
  381. }catch(e){ console.log(e); }
  382. }
  383. function FindPW(){
  384. let atc;
  385. if (host === 'arca.live') {
  386. atc = document.querySelector('body div.article-body > div.fr-view.article-content');
  387. } else if (host === 'kone.gg') {
  388. atc = document.querySelector('div.prose.prose-invert');
  389. }
  390. if (!atc) return;
  391. atc.innerHTML=atc.innerHTML.replace(/(&nbsp;)/g, ' ');
  392. atc.innerHTML=atc.innerHTML.replace(/국룰/g, 'ㄱㄹ');
  393. let rgx=/[(<p>)]{0,0}[ㄱ-ㅣ가-힣0-9A-Za-z\s~`!^\_+@\#$%&=]{0,}(ㄱㄹ){1,}[ㄱ-ㅣ가-힣0-9A-Za-z\s~`!^\_+@\#($)%&=\(\)(&nbsp;)]{0,}[(</p>)]{0,0}/;
  394. let regexx=/(대문자)/;
  395. if(regexx.test(regexx.exec(atc.innerHTML))===true)npw[npw.length]=atob('U01QRU9QTEU');
  396. function dec(reg){
  397. try {
  398. while(reg.test(atc.innerHTML)){
  399. let DECed=reg.exec(atc.innerHTML)[0].replace(/(ㄱㄹ)/g, '국룰');
  400. let DECedd=DECed.replace(/\s|[+]|(&nbsp;)|은|는|이|(전부)|(대문자로)|(대문자)|(비밀번호)|(패스워드)|(비번)|(ㅂㅂ)|(암호)|(ㅇㅎ)|(키오스크맘)|(키오스크)/g, '');
  401. DECedd=DECedd.split(/[(입)(임)(이다)(이고)(이며)(입니다)(임다)(같)(처럼)(틀)]/g)[0];
  402. let dat=document.querySelector('.date .body').innerText.split(' ')[0];
  403. let regexa=/(오늘)|(날짜)|(날자)/g;
  404. if(regexa.test(DECedd)===true){
  405. DECedd=DECedd.replace(regexa, '');
  406. let md=[dat.split(/\-/g)[1] + dat.split(/\-/g)[2],dat.split(/\-/g)[1] +'-'+ dat.split(/\-/g)[2],dat.replace(/\-/g, ''),dat];
  407. for(let i=0;i<4;i++){
  408. npw[npw.length]=DECedd.replace(/국룰/g,chkp[4])+md[i];
  409. }
  410. } else { if(npw.indexOf(DECedd.replace(/국룰/g,chkp[4]))=='-1')npw[npw.length]=DECedd.replace(/국룰/g,chkp[4]); }
  411. atc.innerHTML=atc.innerHTML.replace(reg, '1ㅂㅁ2ㅈㄴ3ㄷㅇ4ㄱㄹ1qa2ws3ed4rf');
  412. atc.innerHTML=atc.innerHTML.replace(/(1ㅂㅁ2ㅈㄴ3ㄷㅇ4ㄱㄹ1qa2ws3ed4rf)/g,DECed);
  413. }
  414. GM.setValue('npw', npw);
  415. } catch(e){ console.log(e, atc); }
  416. }
  417. dec(/[(<p>)]{0,0}[ㄱ-ㅣ가-힣0-9A-Za-z\s~`!^\_+@\#$%&=]{0,}(ㄱㄹ){1,1}[ㄱ-ㅣ가-힣0-9A-Za-z\s~`!^\_+@\#$%&=]{0,}[(</p>)]{0,0}/);
  418. setTimeout(aaa, 100);
  419. }
  420.  
  421. function waitForKoneContent() {
  422. const checkInterval = setInterval(() => {
  423. const atc = document.querySelector('div.prose.prose-invert');
  424. const titleEl = [...document.querySelectorAll('h1.flex, h1.text-xl')].find(el =>
  425. /RJ[0-9]{6,10}|VJ[0-9]{6,10}/i.test(el.textContent)
  426. );
  427.  
  428. const hasBase64 = atc && /aHR0c|YUhSMG|WVVoU|V1ZWb/.test(atc.textContent);
  429.  
  430. if (atc && titleEl && hasBase64) {
  431. clearInterval(checkInterval);
  432. FindPW();
  433. setTimeout(doDec, 300);
  434. }
  435. }, 300);
  436. }
  437.  
  438.  
  439.  
  440. async function aaa() {
  441. const saved = await GM.getValue('npw');
  442. npw = Array.isArray(saved) ? saved : [];
  443. }
  444.  
  445.  
  446. chkPW();
  447.  
  448. if (host === 'arca.live') {
  449. FindPW();
  450. setTimeout(doDec, 10);
  451. } else if (host === 'kone.gg') {
  452. waitForKoneContent();
  453. }
  454.  
  455.  
  456. if(host=='kio.ac'){
  457. aaa();
  458. chkp[0]='.overflow-auto.max-w-full.max-h-full.flex-grow.p-1 input:nth-of-type(1)';
  459. chkp[1]='.flex.flex-col-reverse button:nth-of-type(1)';
  460. chkp[2]='.p-2.align-middle .flex.align-middle button:nth-of-type(1)';
  461. isT[2]=true;
  462. PageLoading[1]=3500;
  463. setTimeout(inputPW, PageLoading[0] + 2000);
  464. }
  465. if(host=='mega.nz'){
  466. aaa();
  467. chkp[0]='#password-decrypt-input';
  468. chkp[1]='.mega-button.positive.fm-dialog-new-folder-button.decrypt-link-button';
  469. chkp[2]='.mega-button.positive.js-default-download.js-standard-download';
  470. PageLoading[1]=4000;
  471. isT[2]=false;
  472. setTimeout(inputPW, PageLoading[0] + 1800);
  473. }
  474. if(host=='kiosk.ac'){
  475. aaa();
  476. chkp[0]='.input.shadow-xl.flex-grow';
  477. chkp[1]='.btn.btn-ghost.w-full.mt-2.rounded-md';
  478. if(Down_Option==2)
  479. chkp[2]='.flex.justify-between.w-full .flex.gap-2 .btn.btn-ghost';
  480. else
  481. chkp[2]='#vexplorer-body .hover.cursor-pointer .flex .dropdown.group button';
  482. if(Down_Option==0)
  483. isT[2]=true;
  484. else
  485. isT[2]=false;
  486. PageLoading[1]=3000;
  487. setTimeout(inputPW, PageLoading[0]);
  488. }
  489. if(host=='workupload.com'){
  490. aaa();
  491. chkp[0]='#passwordprotected_file_password';
  492. chkp[1]='#passwordprotected_file_submit';
  493. chkp[2]='.btn.btn-prio';
  494. if(Down_Option==0)
  495. isT[2]=true;
  496. else
  497. isT[2]=false;
  498. PageLoading[1]=2000;
  499. setTimeout(inputPW, PageLoading[0]);
  500. }
  501. if(host=='drive.google.com'){
  502. aaa();
  503. if(document.URL.split('/')[3] + document.URL.split('/')[4]=='filed')
  504. window.location.href=`https://drive.usercontent.google.com/download?id=${document.URL.split('/')[5]}&export=download`;
  505. if(document.URL.split('/')[3] + document.URL.split('/')[4]=='drivefolders'){
  506. setTimeout(()=> { if(isT[0]==true)setTimeout(()=> { document.querySelector('.pc7nUb.kXQBpc.Dk9rmd:nth-child(2)').click()}, 1500)}, PageLoading[0]);
  507. chkp[2]='.h-De-Vb.h-De-Y';
  508. PageLoading[1]=1;
  509. isT[2]=true;
  510. setTimeout(()=> { if(isT[0]==true)setTimeout(DBtn, 3500)}, PageLoading[0]);
  511. }
  512. }
  513. if(host=='drive.usercontent.google.com'){
  514. aaa();
  515. chkp[2]='.goog-inline-block.jfk-button.jfk-button-action';
  516. isT[2]=true;
  517. setTimeout(()=> { if(isT[0]==true)DBtn()}, 1);
  518. }
  519. if(host=='gofile.io'){
  520. aaa();
  521. chkp[0]='#filesErrorPasswordInput';
  522. chkp[1]='#filesErrorPasswordButton';
  523. chkp[2]='.btn.btn-outline-secondary.btn-sm.p-1.text-white';
  524. PageLoading[1]=3000;
  525. isT[2]=true;
  526. setTimeout(inputPW, PageLoading[0]);
  527. }(function () {
  528. 'use strict';
  529.  
  530. if (location.host !== 'kone.gg') return;
  531.  
  532. function hookDecodeTriggerOnFirstButton() {
  533. const container = document.querySelector('div.flex.items-center.justify-between.p-4');
  534. if (!container) return;
  535.  
  536. const button = container.querySelector('button[data-slot="button"]');
  537. if (!button || button.dataset._somi_hooked === '1') return;
  538.  
  539. button.dataset._somi_hooked = '1';
  540.  
  541. button.addEventListener('click', () => {
  542. setTimeout(() => {
  543. FindPW();
  544. setTimeout(() => {
  545. doDec();
  546. doDlsiteContextAware();
  547. }, 300);
  548. }, 500);
  549. });
  550. }
  551.  
  552. hookDecodeTriggerOnFirstButton();
  553.  
  554. const observer = new MutationObserver(() => {
  555. hookDecodeTriggerOnFirstButton();
  556. });
  557. observer.observe(document.body, { childList: true, subtree: true });
  558. })();
  559.  
  560. (function () {
  561. 'use strict';
  562.  
  563. if (location.host !== 'kone.gg') return;
  564.  
  565. let lastUrl = location.href;
  566.  
  567. const observer = new MutationObserver(() => {
  568. const currentUrl = location.href;
  569. if (currentUrl !== lastUrl) {
  570. lastUrl = currentUrl;
  571. observeAndRun();
  572. }
  573. });
  574.  
  575. observer.observe(document.body, { childList: true, subtree: true });
  576.  
  577. function observeAndRun() {
  578. const start = Date.now();
  579. const timeout = 8000;
  580.  
  581. const timer = setInterval(() => {
  582. const atc = document.querySelector('div.prose.prose-invert');
  583. const hasText = atc && atc.textContent.length > 20;
  584. const hasEncoded = atc && /aHR0c|YUhSMG|WVVoU|V1ZWb/.test(atc.textContent);
  585.  
  586. if (hasText && hasEncoded) {
  587. clearInterval(timer);
  588. FindPW();
  589. setTimeout(() => {
  590. doDec();
  591. doDlsiteContextAware();
  592. }, 300);
  593. }
  594.  
  595. if (Date.now() - start > timeout) {
  596. clearInterval(timer);
  597. }
  598. }, 300);
  599. }
  600.  
  601. observeAndRun();
  602. })();