qq-h5

在非mac平台上使用qq html5播放器

  1. // ==UserScript==
  2. // @name qq-h5
  3. // @namespace https://gf.qytechs.cn/users/111819-gooyie
  4. // @version 0.1.0
  5. // @description 在非mac平台上使用qq html5播放器
  6. // @author gooyie
  7. // @license MIT License
  8. //
  9. // @include *://*.qq.com/*
  10. // @grant none
  11. // @run-at document-start
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. const UA_MAC = 'Macintosh Mac OS X 2333...'; // regexp: /Macintosh.*mac\sos\sx\s([\d_\.]+)/i
  18.  
  19. class Mocker {
  20.  
  21. static mock() {
  22. this._fakeMacPlatform();
  23. }
  24.  
  25. static _fakeMacPlatform() {
  26. Object.defineProperty(navigator, 'userAgent', {get: () => UA_MAC});
  27. }
  28.  
  29. }
  30.  
  31. Mocker.mock();
  32.  
  33. })();

QingJ © 2025

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