Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name 4Chan Expand all Pics
- // @author Snappy
- // @copyright (c) 2010 Snappy
- // @published 2010-05-08 04:05 @ extendopera.org
- // @description Adds a button; when you press it opens a
- // @description new page containing all the pics that you
- // @description are currently watching, all maximized !
- // @include http://boards.4chan.org/*
- // ==/UserScript==
- window.opera.addEventListener(
- 'AfterScript',
- function (e){
- document.getElementById('navtopright').innerHTML =
- '[<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">';
- },
- false);
- function ShowImages(){
- var pic = document.links;
- var nWindow = window.open();
- var j = 0;
- for( var i=0, pics; pics=pic[i]; i++){
- if(pics.href.indexOf("src")!=-1 && j%2){
- nWindow.document.write('<center>' + '<img src="' + pics + '">' + '</center>' + '</br>');
- }
- j++;
- }
- nWindow.document.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement