Greasy Fork

Greasy Fork is available in English.

Twitter Move Community UI to bottom

move ui

当前为 2022-12-24 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
    // @name         Twitter Move Community UI to bottom
    // @namespace    http://tampermonkey.net/
    // @version      0.2
    // @description  move ui
    // @author       You
    // @match        https://twitter.com/*
    // @icon         https://www.google.com/s2/favicons?sz=64&domain=twitter.com
    // @grant        none
    // @license      MIT
    // ==/UserScript==

    //alert('ha');

    document.addEventListener("DOMContentLoaded", ready);
    function ready() {


        function fuckyou(){
            //aria-label="社群"
            var userid = document.querySelector('[class="css-1dbjc4n r-1adg3ll r-bztko3"]').outerHTML.split('UserAvatar-Container-')[1].split('\" style')[0];
            console.log(userid);
            var element = document.querySelector('[href="/'+ userid +'/communities"]');
            element.setAttribute('style', 'order:1;')}

        setTimeout(fuckyou,1000);
    }

    var zNode = document.createElement('div');
    zNode.innerHTML = '<button id="myButton" type="button" style=z-index:10;>'
        + 'For Pete\'s sake, don\'t click me!</button>'
        ;
    zNode.setAttribute('id', 'myContainer');
    zNode.setAttribute('style', 'z-index: 9999;position: absolute;top:0;left:0;display:none;');

    document.body.appendChild(zNode);

    //document.getElementsByClassName('css-1dbjc4n r-1pi2tsx r-1wtj0ep r-1rnoaur r-1e081e0 r-f9dfq4')[0].appendChild (zNode);

    //--- Activate the newly added button.
    document.getElementById("myButton").addEventListener(
        "click", ready, false
    );
    document.getElementById("myButton").click();

/*
    function ButtonClickAction(zEvent) {
        // For our dummy action, we'll just add a line of text to the top of the screen.
        var zNode = document.createElement('p');
        zNode.innerHTML = 'The button was clicked.';
        document.getElementById("myContainer").appendChild(zNode);
    }


    (function () {
        'use strict';
        var x = document.querySelectorAll("a [href='/notifications']");
        x[0].style.backgroundColor = "red";
        x.remove();
        // Your code here...
    })();*/