Krasview Unlock

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

  1. // ==UserScript==
  2. // @name Krasview Unlock
  3. // @name:ru Krasview Unlock
  4. // @namespace krasviewUnlock
  5. // @version 0.2
  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 main() {
  17. 'use strict';
  18.  
  19. const log = (...args) => console.log(`${GM.info.script.name}:`, ...args);
  20. log('start');
  21.  
  22. if (document.querySelector('video') === null) {
  23. const vfc = document.querySelector('#video-flash-container > div');
  24. if (vfc !== null
  25. && vfc.querySelector('h3') !== null
  26. && vfc.querySelector('h3').textContent.includes('ограничительные меры')) {
  27. const ogVideoIframe = document.querySelector('head > meta[property = "og:video:iframe"]').content.slice(0, -5);
  28. vfc.innerHTML = `<br><h3>Похоже сайт перегружен. Смотреть на красвью <a href="${ogVideoIframe}" class="js">тут</a>.`;
  29. }
  30. }
  31. }());