Greasy Fork

来自缓存

Greasy Fork is available in English.

阿里云文件筛选

阿里云文件筛选!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         阿里云文件筛选
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  阿里云文件筛选!
// @author       You
// @match        https://www.aliyundrive.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      MIT
// ==/UserScript==
(function () {
    'use strict';
    let arrays = [];
    let flag = 1;
    let intervalId = setInterval(() => {
        var root = document.getElementsByClassName('grid-card-container')
        console.log(root)
        if (root && root.length != 0) {
            for (let index = 0; index < root.length; index++) {
                const element = root[index];
                arrays.push(element)
            }
            flag = 2;
            clearInterval(intervalId)
        }
    }, 1000);
    while(true){
        console.log(flag)
        if(flag == 2){
            break;
        }
    }
    var typeSelect = document.createElement('div');
    typeSelect.innerHTML = createCheckBox()
    typeSelect.style.position = 'fixed';
    typeSelect.style.width = '300px'
    typeSelect.style.top = '10px';
    typeSelect.style.right = '10px';
    typeSelect.style.backgroundColor = '#FFF';
    console.log('我是分割线---------------')
    console.log(arrays)

    document.body.appendChild(typeSelect);


    function createCheckBox() {
        return "<input type ='checkbox' value ='mp3' name ='type' id ='saliyunp_mp3_id' /> MP3" +
            "<input type ='checkbox' value ='pdf' name ='type' id ='saliyunp_pdf_id' />PDF" +
            "<input type ='checkbox' value ='html' name ='type' id ='saliyunp_html_id' /> HTML"
    }

})();