Two Column S1

two colomn ui for s1

当前为 2015-03-27 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Two Column S1
  3. // @namespace http://exz.me/
  4. // @version 0.1
  5. // @description two colomn ui for s1
  6. // @author Epix
  7. // @match http://bbs.saraba1st.com/2b/*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10.  
  11. if(location.href.startsWith('http://bbs.saraba1st.com/2b/forum-'))
  12. {
  13. var wp =document.querySelector('#wp');
  14. wp.style.width='48%';
  15. wp.style.float='left';
  16. wp.style.minWidth='0px';
  17.  
  18. var f=document.createElement("iframe");
  19. f.id='frame';
  20. f.style.width='51.5%';
  21. f.style.height='95%';
  22. f.style.position='fixed';
  23. f.style.right='0';
  24. f.style.bottom='0';
  25. document.body.appendChild(f);
  26.  
  27. function openpost(p){
  28. var f=document.querySelector('#frame');
  29. f.src=p.querySelector('tr>th>a').href;
  30. }
  31. var a=document.querySelectorAll('#threadlisttableid>tbody');
  32.  
  33. for (var index = 0; index < a.length; ++index) {
  34. a[index].onclick=function(){openpost(this);};
  35. }
  36. }else if(self!=top && location.href.startsWith('http://bbs.saraba1st.com/2b/thread'))
  37. {
  38. GM_addStyle('#toptb,#hd{display:none}');
  39. }