Krasview Unlock

Returns the ability to view videos on krasview (from sites zloekino and hlamer)

当前为 2020-04-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Krasview Unlock
  3. // @name:ru Krasview Unlock
  4. // @namespace krasviewUnlock
  5. // @version 0.1
  6. // @description Returns the ability to view videos on krasview (from sites zloekino and hlamer)
  7. // @description:ru Возвращает возможность просмотра видео на krasview (с сайтов zloekino и hlamer)
  8. // @author Blank
  9. // @match *://zloekino.com/video/*
  10. // @match *://hlamer.ru/video/*
  11. // @run-at document-end
  12. // @grant none
  13. // @noframes
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18.  
  19. const log = (...args) => console.log(`${GM.info.script.name}:`, ...args);
  20. log('start');
  21. if (document.querySelector('video') === null) {
  22. const vfc = document.querySelector('#video-flash-container > div');
  23. if (vfc !== null
  24. && vfc.querySelector('h3') !== null
  25. && vfc.querySelector('h3').textContent.includes('ограничительные меры')) {
  26. const ogVideoIframe = document.querySelector('head > meta[property = "og:video:iframe"]').content.slice(0,-5);
  27. vfc.innerHTML = `<br><h3>Похоже сайт перегружен. Смотреть на красвью <a href="${ogVideoIframe}" class="js">тут</a>.`;
  28. }
  29. }
  30. })();