Greasy Fork is available in English.

Twitter Move Community UI to bottom

move ui

  1. // ==UserScript==
  2. // @name Twitter Move Community UI to bottom
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @description move ui
  6. // @author You
  7. // @match https://twitter.com/*
  8. // @match https://*.x.com/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. //alert('ha');
  15.  
  16. document.addEventListener("DOMContentLoaded", ready);
  17. function ready() {
  18.  
  19.  
  20. function fuckyou(){
  21. //aria-label="社群"
  22. var userid = document.querySelector('[class="css-1dbjc4n r-1adg3ll r-bztko3"]').outerHTML.split('UserAvatar-Container-')[1].split('\" style')[0];
  23. console.log(userid);
  24. var element = document.querySelector('[href="/'+ userid +'/communities"]');
  25. element.setAttribute('style', 'order:1;')}
  26.  
  27. setTimeout(fuckyou,1000);
  28. }
  29.  
  30. var zNode = document.createElement('div');
  31. zNode.innerHTML = '<button id="myButton" type="button" style=z-index:10;>'
  32. + 'For Pete\'s sake, don\'t click me!</button>'
  33. ;
  34. zNode.setAttribute('id', 'myContainer');
  35. zNode.setAttribute('style', 'z-index: 9999;position: absolute;top:0;left:0;display:none;');
  36.  
  37. document.body.appendChild(zNode);
  38.  
  39. //document.getElementsByClassName('css-1dbjc4n r-1pi2tsx r-1wtj0ep r-1rnoaur r-1e081e0 r-f9dfq4')[0].appendChild (zNode);
  40.  
  41. //--- Activate the newly added button.
  42. document.getElementById("myButton").addEventListener(
  43. "click", ready, false
  44. );
  45. document.getElementById("myButton").click();
  46.  
  47. /*
  48. function ButtonClickAction(zEvent) {
  49. // For our dummy action, we'll just add a line of text to the top of the screen.
  50. var zNode = document.createElement('p');
  51. zNode.innerHTML = 'The button was clicked.';
  52. document.getElementById("myContainer").appendChild(zNode);
  53. }
  54.  
  55.  
  56. (function () {
  57. 'use strict';
  58. var x = document.querySelectorAll("a [href='/notifications']");
  59. x[0].style.backgroundColor = "red";
  60. x.remove();
  61. // Your code here...
  62. })();*/