🏠 Home 

Fix src of Flash content

Internet Archive


Install this script?
  1. // ==UserScript==
  2. // @name Fix src of Flash content
  3. // @namespace https://greasyfork.org/users/19523
  4. // @description Internet Archive
  5. // @match http://web.archive.org/web/*/*
  6. // @match https://web.archive.org/web/*/*
  7. // @version 0.13
  8. // @grant none
  9. // ==/UserScript==
  10. (function () {
  11. var embeds = document.querySelectorAll('embed[src$=".swf"]');
  12. var i = 0;
  13. (function rewriteSrc(embed) {
  14. if (!embed) {
  15. return;
  16. }
  17. if (embed.src.match(/\/\d{14,}\//)) {
  18. embed.src = embed.src.replace(/(\/\d{14,})\//, '$1im_/');
  19. }
  20. setTimeout(function () { rewriteSrc(embeds[++i]) }, 500);
  21. })(embeds[i]);
  22. })();