FileCR Assistant Bypass

A simple script to bypass FileCR Assistant.

  1. // ==UserScript==
  2. // @name FileCR Assistant Bypass
  3. // @namespace lemons
  4. // @license Unlicense
  5. // @match *://filecr.com/*
  6. // @match https://anygame.net/downloads/*
  7. // @icon https://filecr.com/favicon.png
  8. // @grant none
  9. // @version 1.5
  10. // @author lemons
  11. // @description A simple script to bypass FileCR Assistant.
  12. // ==/UserScript==
  13.  
  14. // derived from https://greatest.deepsurf.us/en/scripts/479625-filecr-assistant-bypass-helper
  15. window.addEventListener('message', (event) => {
  16. const data = {
  17. direction: 'from-content-script',
  18. responseFor: event.data.id,
  19. type: 'response',
  20. };
  21.  
  22. if (event.data.action === 'app.info') {
  23. data.data = {
  24. id: 'cgdlgjfaminolmljfokbbienpoibhknp',
  25. version: '9.9.9',
  26. };
  27. window.postMessage(data);
  28. return;
  29. }
  30. if (event.data.id === "install-check") {
  31. window.postMessage(data);
  32. return;
  33. };
  34. if (event.data.action === "downloads.extractLink") {
  35. data.data = event.data.data.url;
  36. window.location.href = event.data.data.url;
  37. window.postMessage(data);
  38. return;
  39. };
  40. });
  41.  
  42. let reloading = false;
  43.  
  44. if (!document.cookie.includes("extensionIsInstalled")) {
  45. document.cookie = "extensionIsInstalled=1;";
  46. }
  47.  
  48. const observer = new MutationObserver((mutationsList, observer) => {
  49. mutationsList.forEach(mutation => {
  50. if (mutation.type === 'childList') {
  51. const scriptTag = document.querySelector('script#__NEXT_DATA__');
  52. if (scriptTag) {
  53. if (document.querySelector(".e-404") && !reloading) {
  54. reloading = true;
  55. location.reload();
  56. }
  57. }
  58. }
  59. });
  60. });
  61.  
  62. observer.observe(document.head, {
  63. childList: true,
  64. subtree: true
  65. });