Greasy Fork is available in English.

hmeres dixos helios

Prevents helios from downloading all files by default, instead of opening then on to browser

  1. // ==UserScript==
  2. // @name hmeres dixos helios
  3. // @name:el Ημέρες δίχως helios
  4. // @description Prevents helios from downloading all files by default, instead of opening then on to browser
  5. // @description:el Αποτρέπει το helios να κατεβάζει οτι μαλακία pdf βρει
  6. // @match https://helios.ntua.gr/*
  7. // @author Stavros Avramidis
  8. // @version 0.1.1
  9. // @license MIT
  10. // @namespace https://greatest.deepsurf.us/users/1065988
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. // Select all anchor tags with href attribute ending with forcedownload=1
  15. const downloadLinks = document.querySelectorAll('a[href$="forcedownload=1"]');
  16.  
  17. // Loop through each download link and modify its href attribute
  18. downloadLinks.forEach(link => {
  19. link.href = link.href.replace('forcedownload=1', 'forcedownload=0');
  20. });
  21.  
  22. // Add a click event listener to all elements with class ygtvspacer
  23. const spacers = document.querySelectorAll('.ygtvspacer');
  24. spacers.forEach(spacer => {
  25. spacer.addEventListener('click', () => {
  26. // Select all anchor tags with href attribute ending with forcedownload=1
  27. const downloadLinks = document.querySelectorAll('a[href$="forcedownload=1"]');
  28. // Loop through each download link and modify its href attribute
  29. downloadLinks.forEach(link => {
  30. link.href = link.href.replace('forcedownload=1', 'forcedownload=0');
  31. });
  32. });
  33. });
  34. })();