Photo Station 6 影片快轉

Control Video forward/backward for Photo Station 6. Backword hotkey: "[", Forward hotkey: "]"

  1. // ==UserScript==
  2. // @name Photo Station 6 影片快轉
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @description Control Video forward/backward for Photo Station 6. Backword hotkey: "[", Forward hotkey: "]"
  6. // @author You
  7. // @match http://twmedia.coreop.net/photo/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=coreop.net
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const SECONDS = 5;
  16.  
  17. document.addEventListener('keydown', (event) => {
  18. console.log(event.key)
  19. const extMain = window.Main;
  20. if (!extMain) {
  21. console.log('extJs main not found.');
  22. return;
  23. }
  24. if (event.key === '[') {
  25. const position = extMain.getScope("PhotoStation.VideoPlayer").player.getPosition();
  26. extMain.getScope("PhotoStation.VideoPlayer").player.seek(position - SECONDS);
  27. } else if (event.key === ']') {
  28. const position = extMain.getScope("PhotoStation.VideoPlayer").player.getPosition();
  29. extMain.getScope("PhotoStation.VideoPlayer").player.seek(position + SECONDS);
  30. }
  31. });
  32. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址