#126597 - Lick - Wed Apr 25, 2007 2:17 am
Hehe, I made a few GreaseMonkey UserScripts for use on gbadev.
Here is a preview of the QuickReply-feature.
[Images not permitted - Click here to view it]
Enjoy! ;P
_________________
http://licklick.wordpress.com
#126636 - keldon - Wed Apr 25, 2007 8:32 am
Good stuff, I like this grease monkey 'thing'. Although with images permitted you can see why they're not allowed, they're just too big. Having said that we could change it for a thumbnail!
#126643 - Lick - Wed Apr 25, 2007 11:06 am
Something like if imageSizes[0] > 640 || imageSizes[1] > 480.. -> thumbnail? Sure. That's not too hard to do.
edit I updated the first script (same link), just uninstall and reinstall. Max sizes are [640,480], but you can always change that yourself.
_________________
http://licklick.wordpress.com
#126677 - Dood77 - Wed Apr 25, 2007 10:50 pm
Neat! B)
Many thanks...
#126683 - keldon - Wed Apr 25, 2007 11:02 pm
There is another way to handle it, just look at how this forum handles images by resizing this thread and looking at the image in the signature at the bottom!!!
#126686 - Lick - Wed Apr 25, 2007 11:20 pm
keldon: could you explain what you mean? I don't see anything special there.
_________________
http://licklick.wordpress.com
#126688 - keldon - Wed Apr 25, 2007 11:29 pm
I meant resizing the thread in that board; basically it does not set the width to any specific width; just makes it fit the window that it is in.
#126718 - chuckstudios - Thu Apr 26, 2007 2:19 am
You are a god.
#126737 - HyperHacker - Thu Apr 26, 2007 5:51 am
I've been looking for a reason to switch from Proxomitron to GreaseMonkey. Thanks. :)
Though when I first installed these two scripts, one of them went into an endless loop, but I refreshed and now they seem to be working. o_O My guess is the Permit Images script. In imageOnLoad() it contains "while(!this.complete);" - this is going to tie up the CPU waiting for the image to load. (Hence, when I refreshed and the image was already cached, it didn't loop because there was no load time.) You should rewrite the code to use a timer to check for this. (Javascript really needs a Sleep() function, but anyway...) I'd do it, but I have to go to bed in -25 minutes. ;-)
_________________
I'm a PSP hacker now, but I still <3 DS.
#126760 - Lick - Thu Apr 26, 2007 12:04 pm
Yeah that happens here occasionally too, but not very often. I'll updated it in a bit. =)
update
Same files (see first post):
- Permit Images: removed the loop
- QuickReply: added hide/show toggle
- QuickReply: added option to hide/show by default
To change the option, simply rightclick the monkey while viewing a topic, and choose "User Script Command" > "Hide/Show by default".
_________________
http://licklick.wordpress.com
#126770 - keldon - Thu Apr 26, 2007 1:22 pm
The show/hide quick reply feature is neat!!!
#126814 - Dood77 - Fri Apr 27, 2007 12:07 am
did this work...? (quick reply test...)
EDIT: okay, obviously it worked. one time using it I got an illegal session error from pHpBB...
#126844 - Link_of_Hyrule - Fri Apr 27, 2007 7:37 am
anyone know how to get this to work with IE7Pro
EDIT:
i got the .js files onto the list but they dont seem to be working i dont know java or what ever code the files are in so i wouldnt know how to get them to work with this any suggestions?
http://www.ie7pro.com/
EDIT: i see a little bar at the bottom now taht says Alpha quick reply but thats all
#126849 - keldon - Fri Apr 27, 2007 9:38 am
This is for GREASE MONKEY, which only works with mozilla/firefox
#126850 - Lick - Fri Apr 27, 2007 9:46 am
Link_of_Hyrule wrote: |
anyone know how to get this to work with IE7Pro
EDIT:
i got the .js files onto the list but they dont seem to be working i dont know java or what ever code the files are in so i wouldnt know how to get them to work with this any suggestions?
http://www.ie7pro.com/
EDIT: i see a little bar at the bottom now taht says Alpha quick reply but thats all |
Wow, that's pretty cool. If it works as I expect, you should be able to CLICK that bar at the bottom, and it should pop out a form right under the bar.
_________________
http://licklick.wordpress.com
#126926 - HyperHacker - Sat Apr 28, 2007 2:19 am
There's a universal PHPBB Quick Reply script on userscripts.org, but this one is better. Think you could get yours supporting all PHPBBs?
_________________
I'm a PSP hacker now, but I still <3 DS.
#126928 - Lick - Sat Apr 28, 2007 2:43 am
This script doesn't do anything gbadev specific, so perhaps if you enable it for other websites, it might just work!
And I don't really want to waste too much time on this, it's not really a priority now is it? But anyone with a bit of JavaScript knowledge should be able to modify it to fully work with other websites.
_________________
http://licklick.wordpress.com
#126941 - keldon - Sat Apr 28, 2007 8:25 am
Well I now use this script on every PHPBB site that I use ^_^
#126944 - Lick - Sat Apr 28, 2007 9:17 am
Nice! :D Well, it seems like you only have to change the "includes" (pages where this script is activated) to:
Quote: |
http://*viewtopic.php* |
_________________
http://licklick.wordpress.com
#126953 - keldon - Sat Apr 28, 2007 11:00 am
Yes, and you also don't have to worry about the namespace when you do it like that either!
#127101 - Link_of_Hyrule - Mon Apr 30, 2007 12:19 am
all i see is the bar how do i open it lol also do you think you could add in quick-edit into the script that would be cool www.wiyb.org has quick edit if you dont know what i mean
#127103 - keldon - Mon Apr 30, 2007 12:33 am
Link_of_Hyrule wrote: |
all i see is the bar how do i open it lol also do you think you could add in quick-edit into the script that would be cool www.wiyb.org has quick edit if you dont know what i mean |
Did you read my last response? The script is for greasemonkey; look at the first page ... grease monkey is for Mozilla/Firefox
#127104 - Lick - Mon Apr 30, 2007 12:33 am
Honestly, that would be frickin' cool. I love Quick Edits on Digg. It's going to take a lot of time to implement it though, and right now I don't have that much time. =(
As for the bar, try clicking it. If it doesn't work then you should just get Firefox.
_________________
http://licklick.wordpress.com
#127107 - keldon - Mon Apr 30, 2007 12:41 am
Yes, why are you using that ghastly Internet Explorer anyway?
#127111 - tepples - Mon Apr 30, 2007 1:35 am
Is it IE, or is it Opera?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#127113 - Link_of_Hyrule - Mon Apr 30, 2007 1:44 am
it says the page has an error when loading
Line: 4
Char: 1
Error: Object expected
Code:0
URL: http://forum.gbadev.org/viewtopic.php?p=127101
i use IE7 because FF makes certain applications i use the run using ie not work properly an i dont see what the point of using FF is i can do mostly everything in ie that i do in ff
edit:
i posted the topic here http://forum.ie7pro.com/viewtopic.php?pid=2860#p2860 for any ie users that want this to work
Last edited by Link_of_Hyrule on Mon Apr 30, 2007 1:51 am; edited 1 time in total
#127114 - tepples - Mon Apr 30, 2007 1:51 am
Every page view with IE is a vote for sites that use document.all, ActiveX, and other Microsoft proprietary extensions to web technologies.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#127115 - Link_of_Hyrule - Mon Apr 30, 2007 1:55 am
well were getting a little off topic this post is supose to be about the user scripts lick made weather you use ie or firefox doesnt matter
if the scripts could be made to work with ie7pro and if opera has something of the sort then for that too that would be cool cus then everyone could use it
EDIT:
found this http://userscripts.org/scripts/show/7238
#127122 - Link_of_Hyrule - Mon Apr 30, 2007 4:06 am
To get this to work with IE7Pro make a text file name it PermitImages.ieuser.js copy this into it and save this works best with textpad which can be found here http://www.textpad.com/
Code: |
// ==UserScript==
// @name Permit images on gbadev
// @namespace http://forum.gbadev.org
// @description Permit inline images in posts
// @author rickinhethuis@gmail.com
// @include http://forum.gbadev.org/*
// ==/UserScript==
function imageOnLoad(ev)
{
var e = ev || window.event;
//event.preventDefault();
e.returnValue = false;
var MAX_WIDTH = 640;
var MAX_HEIGHT = 480;
if(this.width > MAX_WIDTH)
{
var ratio = 1.0*this.height/this.width;
this.width = MAX_WIDTH;
this.height = MAX_WIDTH * ratio;
}
else if(this.height > MAX_HEIGHT)
{
var ratio = 1.0*this.width/this.height;
this.height = MAX_HEIGHT;
this.width = MAX_HEIGHT * ratio;
}
}
var links = document.getElementsByTagName('a');
for(i=0; i<links.length; i++)
{
if(links[i].innerHTML.indexOf('not permitted') != -1)
{
var img = document.createElement('img');
img.setAttribute('src',links[i].href);
img.attachEvent('onload', imageOnLoad);
links[i].removeChild(links[i].firstChild);
links[i].appendChild(img);
}
} |
#127250 - HyperHacker - Tue May 01, 2007 5:43 am
Lick wrote: |
This script doesn't do anything gbadev specific, so perhaps if you enable it for other websites, it might just work!
And I don't really want to waste too much time on this, it's not really a priority now is it? But anyone with a bit of JavaScript knowledge should be able to modify it to fully work with other websites. |
It does do some GBADev-specific things though - it assumes that HTML is off, smilies are off, BBcode is on, etc.
_________________
I'm a PSP hacker now, but I still <3 DS.
#141658 - HyperHacker - Fri Sep 28, 2007 12:43 am
Mind the bump, but I tracked down what's causing the occasional "script is causing lag" messages in Firefox on this site: The Permit Images script spinning on images that load slowly. Is there no way to set a callback for when the image is done, or check with a timer, instead of spinning?
_________________
I'm a PSP hacker now, but I still <3 DS.
#141689 - Lick - Fri Sep 28, 2007 9:49 am
Test [Images not permitted - Click here to view it]
@ HyperHacker: try reinstalling from the same URL. I'm not sure what caused it but I don't seem to be having the same bug. Any topic where it happens by default?
_________________
http://licklick.wordpress.com
#141802 - HyperHacker - Sun Sep 30, 2007 7:34 am
Yeah, I must have had an old version. >_> I see the problematic line isn't even in that source.
_________________
I'm a PSP hacker now, but I still <3 DS.
#141856 - Dood77 - Sun Sep 30, 2007 9:35 pm
Whenever I load multiple tabs (say, 10+) and theres a few images in one, firefox tells me a script is not responding, and if I stop it, the images still turn up fine on the page
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#141866 - Lick - Sun Sep 30, 2007 11:33 pm
Dood77 wrote: |
Whenever I load multiple tabs (say, 10+) and theres a few images in one, firefox tells me a script is not responding, and if I stop it, the images still turn up fine on the page |
Did you try the most recent files? (Remove script, re-add them)
_________________
http://licklick.wordpress.com