Advertisement
Guest User

OPERA - 4chan expands all pics at once !!

a guest
Sep 10th, 2012
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        4Chan Expand all Pics
  3. // @author      Snappy
  4. // @copyright   (c) 2010 Snappy
  5. // @published   2010-05-08 04:05 @ extendopera.org
  6. // @description Adds a button; when you press it opens a
  7. // @description new page containing all the pics that you
  8. // @description are currently watching, all maximized !
  9. // @include     http://boards.4chan.org/*
  10. // ==/UserScript==
  11.  
  12. window.opera.addEventListener(
  13.     'AfterScript',
  14.    
  15. function (e){
  16.     document.getElementById('navtopright').innerHTML =
  17.     '[<a href="javascript:void(0);" id="settingsWindowLink">Settings</a>][<a href="http://www.4chan.org/" target="_top">Home</a>]<input type="button" onclick="ShowImages()" value="Open Pics">';
  18.     },
  19. false);
  20.  
  21. function ShowImages(){
  22.     var pic = document.links;
  23.     var nWindow = window.open();
  24.     var j = 0;
  25.     for( var i=0, pics; pics=pic[i]; i++){
  26.         if(pics.href.indexOf("src")!=-1 && j%2){
  27.             nWindow.document.write('<center>' + '<img src="' + pics + '">' + '</center>' + '</br>');
  28.         }
  29.     j++;
  30.     }
  31.     nWindow.document.close();
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement