Moodle - Easy Read

Un userscript vraiment leger pour justifier les données des sites d'infos français et d'augmenter un peu la taille de lecture.

  1. // ==UserScript==
  2. // @name Moodle - Easy Read
  3. // @namespace http://flowbooks.fr/
  4. // @version 1.4
  5. // @description Un userscript vraiment leger pour justifier les données des sites d'infos français et d'augmenter un peu la taille de lecture.
  6. // @author Antoine Tagah
  7. // @include http://moodle.univ-angers.fr/mod/book/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. WebFontConfig = {
  12. google: { families: [ 'Lora:400,400italic,700,700italic:latin' ] }
  13. };
  14. (function() {
  15. var wf = document.createElement('script');
  16. wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
  17. '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
  18. wf.type = 'text/javascript';
  19. wf.async = 'true';
  20. var s = document.getElementsByTagName('script')[0];
  21. s.parentNode.insertBefore(wf, s);
  22. })();
  23.  
  24. url= document.URL;
  25.  
  26. if (/moodle.univ-angers.fr\/mod/.test(url)) {
  27.  
  28. var el = document.getElementById('region-main');
  29. }
  30. //el.setAttribute('style', 'text-align: justify; word-spacing: 2px;');
  31. el.style.fontSize="20px";
  32. el.style.fontFamily="'Slabo 27px',Bookerly, Lora";
  33. el.style.wordSpacing="3px";
  34. el.style.textAlign="justify";
  35. el.style.textIndent="15px";
  36. //el.setAttribute("class", "span11 offset3");
  37.  
  38. if(document.createElement){
  39. head=document.getElementsByTagName('head').item(0);
  40. script=document.createElement('script');
  41. script.src='http://sd-g1.archive-host.com/membres/up/3cae4e4a561c71fb9af9e0fe3052acfc9ed06627/Hyphenator.js?bm=true';
  42. script.type='text/javascript';
  43. head.appendChild(script);
  44. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址