AliyundrivePlayerStyle

Aliyundrive Player Style

  1. // ==UserScript==
  2. // @name AliyundrivePlayerStyle
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Aliyundrive Player Style
  6. // @author JackieZheng
  7. // @match *://www.aliyundrive.com/drive/*
  8. // @icon https://gw.alicdn.com/imgextra/i3/O1CN01aj9rdD1GS0E8io11t_!!6000000000620-73-tps-16-16.ico
  9. // @supportURL https://github.com/JackieZheng/AliyundrivePlayerStyle/issues
  10. // @grant GM_addStyle
  11. // ==/UserScript==
  12.  
  13. GM_addStyle(".video-previewer,.video-previewer--1vo5c,.header,.header--2Vw8Y{padding: 10px !important;background: #000000;}");
  14. GM_addStyle(".header--2Vw8Y{height: 10px !important;opacity: .1;}");
  15. GM_addStyle(".header--2Vw8Y:hover{height: 60px !important;opacity: 1;}");
  16. GM_addStyle(".video-player,.video-player--29_72{bottom: 0px !important;left: unset !important; -webkit-transform: unset !important; transform: unset !important;}");
  17. GM_addStyle(".icon,.icon--d-ejA,.icon--d-ejA[data-render-as=svg] svg,.nav-text,.nav-text--2o_Eh,.filename,.filename--zkxdz,.nav-actions--3xj7P{fill:#aaaaaa61 !important;color:#aaaaaa61;}");
  18. GM_addStyle(".toolbar-wrapper[data-visible=true],.toolbar-wrapper--1NDow[data-visible=true] {opacity: .4 !important;height: 50px;overflow: hidden;}");
  19. GM_addStyle(".video-player.show,.video-player--29_72.show--Zy5bU {opacity: .4 !important;width: 100%;}");
  20. GM_addStyle(".toolbar-wrapper[data-visible=true]:hover,.toolbar-wrapper--1NDow[data-visible=true]:hover {opacity: 1 !important;height: auto;}");
  21. GM_addStyle("video{top:10px !important;height:calc( 100% - 10px ) !important;}");
  22. GM_addStyle(".video-stage.video,.video-stage.thumbnail,.video-stage--3LCB4.video--26SLZ,.video-stage--3LCB4.thumbnail--2T1JI{top:10px !important;height:calc( 100% - 10px ) !important;}");
  23. GM_addStyle(".drawer-item,.drawer-item--2cNtQ,.drawer-item[data-is-current=true],.drawer-item--2cNtQ[data-is-current=true]{justify-content: center !important;}");
  24. GM_addStyle(".drawer-item[data-is-current=true] .title .filename,.drawer-item--2cNtQ[data-is-current=true] .title--2vewu .filename--3hcxw{color: #faad14; !important;}");
  25. GM_addStyle(".drawer-item[data-is-current=true] .text,.drawer-item--2cNtQ[data-is-current=true] .text--AMJbu,.drawer-item--2cNtQ[data-is-current=true] .text--3NvlJ{color: #faad14; !important;}");
  26.  
  27.  
  28. (function() {
  29. 'use strict';
  30. setTimeout(getTitle, 2000 );
  31. window.addEventListener("hashchange", getTitle);
  32. document.body.addEventListener('click',getTitle, false);
  33. document.body.addEventListener('mousemove',getTitle, false);
  34. function getTitle(){
  35. var divLength=document.querySelectorAll("div[class^=breadcrumb-item-link]").length;
  36. if(divLength>0)
  37. {
  38. document.title=document.querySelectorAll("div[class^=breadcrumb-item-link]")[divLength-1].textContent;
  39. }
  40. }
  41.  
  42. })()