Old github dashboard Script 253583

This scripts that returns the old github dahsboard to your home page.

当前为 2023-09-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Old github dashboard Script 253583
  3. // @namespace renanborgez
  4. // @author renanborgez
  5. // @version 1.1
  6. // @match https://github.com/
  7. // @match https://github.com/dashboard-feed
  8. // @description This scripts that returns the old github dahsboard to your home page.
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. fetch('https://github.com/dashboard-feed').then(response => response.text()).then(data => {
  14. const parser = new DOMParser();
  15. const doc = parser.parseFromString(data, 'text/html');
  16. const olddashelement = doc.getElementsByTagName('main')[0]
  17.  
  18. document.getElementById('dashboard').innerHTML = olddashelement.innerHTML;
  19. }).catch(console.log);
  20. })();