Change Google Classroom User

Swithces between /u/0 & /u/1 on google classroom automatically.

目前为 2019-11-16 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Change Google Classroom User
  3. // @namespace Change Google Classroom User by C4illin
  4. // @description Swithces between /u/0 & /u/1 on google classroom automatically.
  5. // @match *://classroom.google.com/*
  6. // @run-at document-start
  7. // @grant none
  8. // @author C4illin <C@illin.cf>
  9. // @oujs:author C4illin
  10. // @version 1.1.1
  11. // @homepageURL https://github.com/C4illin/Change-Google-Classroom-User
  12. // @license MIT; https://opensource.org/licenses/MIT
  13. // @copyright 2018-2019, C4illin (https://github.com/C4illin)
  14. // ==/UserScript==
  15.  
  16.  
  17. if (document.getElementsByClassName("FKF6mc").length != 0) {
  18. if (window.location.pathname.substring(3,4) == 0) {
  19. var user = 1
  20. } else {
  21. user = 0
  22. }
  23. var newlink = "https://classroom.google.com/u/"+ user + window.location.pathname.substring(4) + window.location.search + window.location.hash
  24. window.location.replace(newlink)
  25. }