PHP Documentation Columnify

View PHP Document as multi column

目前为 2015-08-29 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name PHP Documentation Columnify
  3. // @version 1.5
  4. // @description View PHP Document as multi column
  5. // @author Shakil Shahadat
  6. // @match http://php.net/manual/en/
  7. // @match http://php.net/manual/en/index.php
  8. // @grant none
  9. // @namespace https://greasyfork.org/users/6404
  10. // ==/UserScript==
  11.  
  12. document.querySelector('.chunklist').style.WebkitColumnCount = 4;
  13. document.querySelector('.chunklist').style.MozColumnCount = 4;
  14. document.querySelector('.chunklist').style.ColumnCount = 4;
  15.  
  16. document.querySelector('.chunklist').style.WebkitColumnRuleStyle = 'dotted';
  17. document.querySelector('.chunklist').style.MozColumnRuleStyle = 'dotted';
  18. document.querySelector('.chunklist').style.ColumnRuleStyle = 'dotted';
  19.  
  20. document.querySelector('.chunklist').style.WebkitColumnRuleWidth = '1px';
  21. document.querySelector('.chunklist').style.MozColumnRuleWidth = '1px';
  22. document.querySelector('.chunklist').style.ColumnRuleWidth = '1px';
  23.  
  24.  
  25. document.querySelector('.page-tools').style.display = 'none';
  26. document.querySelector('#usernotes').style.display = 'none';
  27. document.querySelector('nav').style.position = 'absolute';
  28.  
  29. document.querySelector('.info').style.display = 'none';
  30.  
  31. //Dynamically add target="_blank" to the anchor links
  32. for ( var i = 0; i < document.querySelectorAll('a').length; i++ )
  33. {
  34. document.querySelectorAll('a')[i].setAttribute("target","_blank");
  35. //document.querySelectorAll('a')[i].style.textDecoration = 'none';
  36. }