pouët.net

Go to bottom

YTembed.user.js for Pouet's prod page

category: offtopic [glöplog]
Behold the prodScreenshot.user.js. It works on ALL pages but the index ( it gets very crowded ): search results, prod lists,group page, user page, in the comments of a prod, in the BBS, ...
added on the 2012-08-24 22:26:30 by p01 p01
Oh, and toggle button somewhere on the page would be cool :)
(I can just disable the script, but then I have to reload the page as well)
added on the 2012-08-24 22:44:29 by Tomoya Tomoya
Fair enough. Let's try again. This time the thumbnail goes first and is centered vertically with the rest of the text.
added on the 2012-08-24 22:50:23 by p01 p01
Much better now, thanks!
added on the 2012-08-24 23:03:02 by Tomoya Tomoya
yes it's a lot better.

also with the current system, does it means the script is hammering the server 3 times for each prod (once for png, gif, jpg) ? with the first script it stopped once it found something (and store it in localstorage for later use). it also try in this order : png, jpg, gif (the frequency they appear in screenshot folder)
added on the 2012-08-24 23:11:24 by Tigrou Tigrou
another idea perhaps is a script for the bbs that all youtube and vimeo links get replaced with an embedded player? would turn the demoish videos thread for example megasexy ;)
Tigrou: Yes, it is "hammering" the server. I doubt it will suffer much though since the images all have an ETAG and return a 304 as accepeted. But yes it is a lot of requests for nothing. I'll bring back your retry+localStorage mechanism. Also thanks for the heads up about the screenshot folder.

Maali: Definitely on my TODO list. Gotta figure how to embed a Vimeo capture. Any hint ?
added on the 2012-08-25 22:49:28 by p01 p01
Code: http://vimeo.com/::number::


Code: <iframe src="http://player.vimeo.com/video/::number::" width="::width::" height="::height::" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>


The real problem is the width and height there, as their videos aren't necessarily of the usual dimensions.
added on the 2012-08-25 23:01:21 by mog mog
p01: i toyed around by tweaking videoembed (from userscripts.org) to pouet needs, so you might wanna peak into that one (it supports even more video sites actually, but youtube and vimeo should be fine enough).. only that it shows the url in the prod.php~manDownload now as an embedded player too, so i need to fix that when i can be assed :D
many thanks for the tool!
added on the 2012-08-26 02:39:12 by skarab skarab
unicoder.user.js replaces the &#1337; code by their correspoding character by using an XPATH expression to find the elements whose text contain a & character, look for &#1337; codes withstanding linebreaks and replace them by the corresponding character.
added on the 2012-08-26 23:00:01 by p01 p01
Apparently the youtube video is not loaded, when its url starts with 'https' :)
added on the 2012-09-24 00:08:40 by Tomoya Tomoya
Um, sorry... disregard that, apparently I had an older version :D
added on the 2012-09-24 00:13:22 by Tomoya Tomoya
Fix :

Add these two lines in header of prodScreenshot script to avoid unwanted screenshots in prod comments (because pouet.net now have links on datetime of every prod comment )

Quote:

// @exclude http://pouet.net/prod.php*
// @exclude http://www.pouet.net/prod.php*


(It is not perfect as it also remove potential links posted by people in a prod comment)

added on the 2013-02-10 18:24:20 by Tigrou Tigrou
Tigrou: I think all that's needed is $ sign at the end of the regex. Gotta double check 'coz I have some more local changes to that user.js
added on the 2013-02-12 00:02:24 by p01 p01
SilverPouet adds clickable icons next to the video links, to update a silver screen dropping down from the top of Pouet on hover.

This was partly lifted from a PR by mog, and recognizes video links from Youtube, Vimeo, CappedTV, LiveLeak, DailyMotion, .avi .mp4 and .mpg videos.

\o/
added on the 2013-02-12 00:02:37 by p01 p01
Quote:
I think all that's needed is $ sign at the end of the regex.

right. best solution are sometimes simplest ones :)
Quote:
silverpouet

cool ! i'm checking this right now !
added on the 2013-02-12 00:29:53 by Tigrou Tigrou
As a gloperator, I'd like to thank everyone involved in making of this script. Makes verification of added youtube links a lot easier, thanks!
added on the 2013-03-05 13:16:59 by Tomoya Tomoya
<3
added on the 2013-03-05 22:23:34 by mog mog
Just tried this for the first time. Great stuff, thank you for making life a little easier :)
added on the 2013-03-05 22:33:48 by raizor raizor
mog: Glad you like! Let me know if I can better credit your work there.

Glad these script(s) help ^___^
Out of curiosity, are you guys talking about SilverPouet or YTembed.user.js ? Any gotcha or things you think should work differently ?
added on the 2013-03-05 22:44:30 by p01 p01
p01: Nah, we're good. Like how you always manage to do the same thing with less code, and still keep it readable, hats off for that :)
added on the 2013-03-05 22:49:01 by mog mog
I finally pushed my local changes of prodScreenshot.user.js

Changelog:

  • The prod links with a #fragment are discarded
  • The screenshots are loaded sequentially to not DDOS Pouet

added on the 2013-03-10 13:51:33 by p01 p01
Your code is nifty <3
added on the 2013-03-11 00:33:18 by mog mog

login

Go to top