h5player icon indicating copy to clipboard operation
h5player copied to clipboard

[BUG]

Open pin240 opened this issue 3 years ago • 0 comments

Win7 x64 Opera 77.0.4054.90 Violentmonkeyv2.13.0

video.sibnet.ru

Воспроизведение рывками с длинными паузами.

function getTabId () {
  return new Promise((resolve, reject) => {
  ->  window.GM_getTabs(function (obj) {
      if (!obj.tabId) {
        obj.tabId = getId();
        window.GM_saveTabs(obj);
      }
       curTabId = obj.tabId;
      resolve(obj.tabId);
    });
  })
}

Uncaught (in promise) TypeError: window.GM_getTabs is not a function at HTML5 видео плеер улучшенный скрипт.user.js:3639 at new Promise () at getTabId (HTML5 видео плеер улучшенный скрипт.user.js:3638) at HTML5 видео плеер улучшенный скрипт.user.js:5901 at injected-web.js:1 at injected-web.js:1 at Array.forEach () at f (injected-web.js:1) at injected-web.js:1 at Array.forEach ()

Решения для меня
 function getTabId () {
  return new Promise((resolve, reject) => {
    window.GM_getTabs(function (obj) {
      if (!obj.tabId) {
        obj.tabId = getId();
        window.GM_saveTabs(obj);
      }
      
      curTabId = obj.tabId;
      resolve(obj.tabId);
    });
  })
}
setTimeout(getTabId, 350);

pin240 avatar Feb 09 '22 13:02 pin240