[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Chanslide
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /h/ - Hentai

Thread replies: 67
Thread images: 29
File: chanslide.png (114 KB, 1277x762) Image search: [Google]
chanslide.png
114 KB, 1277x762
Hello /h/!
I've been looking for an image viewer/slideshow to use on here to fap and not have to navigate and I couldn't find anything that doesn't require either a browser plugin (bad security) or stand-alone software (worse security), so I took some time and wrote a bookmarklet.

What it does:
>creates a slideshow containing all images posted in the thread*
>supports all image formats allowed on the chan**
>cycles through all images with a delay of 6 seconds
>wraps from the last to the first image and continues
>pause/play function
>manual navigation
>hide/show feature
>no browser plugin/other software needed (not even greasemonkey or similar)
>works on all boards (as far as I can tell)

What it does not:
>*images posted and updated via 4chan's auto update feature AFTER the slideshow starts are ignored
>**doesn't support .webm files as of now (but doesn't crash if it encounters one either)
>doesn't detect if a .gif is longer than 6 seconds

Additional info:
For anyone who doesn't know what a bookmarklet is, such a thing is a little piece of javascript that is implemented into a plain old bookmark. You run it by clicking on the bookmark and as soon as the page is refreshed or another page is loaded, it is gone and can be run again at will.

I'd really like to hear suggestions for additional features in the future and to know if people are interested.
Also if you encounter a bug, make a reply and I'll look into it.

How to set it up: Pic related.
Source: pastebin.com/idJihRBQ

>I'll make a quick image dump for you guys to test it, but feel free to test it anywhere else.
>>
File: wallhaven-303180.jpg (515 KB, 1920x1080) Image search: [Google]
wallhaven-303180.jpg
515 KB, 1920x1080
>>
File: 1464983692333.jpg (340 KB, 2560x1440) Image search: [Google]
1464983692333.jpg
340 KB, 2560x1440
>>
>>
File: BfG919wCYAA1wMt.png (553 KB, 599x848) Image search: [Google]
BfG919wCYAA1wMt.png
553 KB, 599x848
>>
>>
>>
>>
File: fOCf8mF.png (938 KB, 1024x768) Image search: [Google]
fOCf8mF.png
938 KB, 1024x768
In case the mods agree with me that this is relevant to /h/ I'll frequently check if somebody wants information about that, has suggestions, experiences bugs or if you guys simply aren't interested, in case they disagree, well, at least you guys have a few images to look at while it lasted and I now have a handy image viewer tool.
>>
>>4288147
So isn't this effectively like the FapGauntlet but without requiring any downloads but in turn lacking the countdown/rythmn it has?
>>
This is nice anon, I've always wanted something like this. Thank you!
>>
Doesn't seem to be working for all images. Having trouble loading some of them.
>>
>>4288689
Any idea what images?
If any images get updated into the thread it can happen that they show as blank/broken images. I'll fix that as of tomorrow. Only other explanation is the lack of webm support which I will temporarely fix tomorrow by skipping them (they'll be supported at some point if the chan is interested enough).

>>4288676
glad you like it, frequent this thread, there will be at least one update

>>4288663
Only kind of as far as I can tell. I'm only familiar with FG from their github, but it sounds like it's randomly selected images and there's no manual navigation. This is really only a slideshow/viewer and yet, it doesn't require any third party software/plugin which was the point of it. I'm also not trying to compete with FG.
>>
>>4288707
*yes
>>
>>4288147
Sorry for being a fag, but how do you do it? Like how do you set up the bookmark to do this? I see the code in the pastebin, just unsure of what to do with it.
>>
I'm not sure what this does that 4chanX's slideshow can't/doesn't do
>>
File: 1464784108640.jpg (175 KB, 1152x720) Image search: [Google]
1464784108640.jpg
175 KB, 1152x720
>>4288712
You paste the code to the same field you'd usually paste URL/target of the bookmark. For example if you have a bookmark for Google, you replace "http://www.google.com" with the javascript code in the pastebin.

>>4288898
It doesnt require any browser plugins and, with some current early phase quirks, is cross browser compatible. To ensure compatibility with older browsers and even mobile devices I'll host it seperately and put a call to it into the bookmarklet itself - it should then work anywhere. Old browsers and many mobile devices set the maximum number of characters to be lower than the script currently is, but that won't then be a problem anymore.
>>
I just found a bug with adblock (or in fact, the lack of it, meaning people who DON'T use adblock will run into problems). I'll fix that as of today.
>>
>>4288707
Posting to let you know that you're not alone - I'm lurking and staying tuned for updates but not really posting (one handed posting is slow).
>>
>>4289022
Just letting you guys know I fixed the issue with ad-block - it can now be disabled or enabled and shouldn't cause any trouble (I of course recommend disabling it, 4chin ads are chill). Will add what I promised to fix today and release the update.
>>
Temporarily fixed the .webm issue by skipping them, webm support won't be added today as my main priority is /h/ and .webm's are rare on here.

Last thing I'm working on today is to include auto-updated images in the slide.
>>
this post is to test the autoupdate feature
>>
File: 1463437203831.jpg (247 KB, 847x653) Image search: [Google]
1463437203831.jpg
247 KB, 847x653
>>4289168
seems to be working like intended, just a little more testing and I'll give the release for today
>>
File: nTeuIJq.jpg (54 KB, 500x304) Image search: [Google]
nTeuIJq.jpg
54 KB, 500x304
>>
>>
>>
[Update] (source at the end of the post)

What's new?
>Added auto-update feature that aligns with 4chans native auto-update
>hiding and showing the slide will resize it to the current window size (if you started the slide while your browser was windowed and want it enlarged, hide and show)
>fixed issue with ad-block
>fixed issue with webm files (they get skipped as of now)

What's coming?
>next/previous image(s) preview
>external javascript file to support older browsers and mobile devices (optional, I'll still release the full source with every future update)
>some kind of visualization when the next image is coming up
>probably "reverse" auto slide-mode

When's that happening?
>Not today, as I'm done with everything I wanted and promised for today. Tommorrow my time table is full, sadly. I'll be back Wednesday in hopes of bug reports, feedback and suggestions from you guys.

Source (remember to copy the RAW PASTE DATA): pastebin.com/d9rGTeyA


I didn't experience any unexpected behaviour, but that doesn't mean much, please report bag if you encounter bugs.
>>
>>4289075
Source?
>>
>>4289213
There's a few under the "thighhigh" tag on Rule34

rule34.xxx/index.php?page=post&s=list&tags=thighhighs&pid=210

No idea about the artist, but there's more of this character in equal quality (but luckily without that virgin theme, I'm totally not into that).
>>
>>4288707
At first I thought that it's not loading png files, but it'S completely random. It simply gives me the "image file not found" icon in the top left corner for some and nothing else.
>>
>>4288707
You can actually also manually flip through the FG "catalog" you have available on your machine, it's very much like this one. Obviously having to download all those images first eats up a lot of space over time, though.
>>
doesn't work with chrome
>>
>>4289928
It does, I am on chrome. What version are you on and what exactly is the behavior you experience? If you really want to help me out, could you bring up the dev tools (STRG+SHIFT+i) and look at console messages? Would really be appreciated.


>>4289918
I've experienced that my own, refreshing the page fixes that and the console shows me a GET, so it SHOULD load, but it doesn't. I'm working on that (I'll detect a faulty load and try to reload it). Should be fixed as of tomorrow, given the error is caused the way I expect it to, if not, we'll see. Might be some weird anomalie with the way I fetch the file formats, if so, I'll try to fix that, too.

>>4289919
I didn't know that, but I'll still continue to dev this one, even if only for myself.
>>
Suggestion for the next update: an option to randomize the order of the images in the thread and perhaps choose a different time between them?
I don't code so I don't know how difficult the request is though.
>>
>>4291925
Customizable delay WILL be in the next update, I also implemented the use of arrow keys (left/right), but I'll focus on bugfixing first before adding other features. I wasn't sure if I should add a random option, because given that everyone posts different images anyways I don't really see the use of it, but since the image stream is held in a variable with an index and the biggest index is known, randomizing the slide is a matter of two lines of code, so it'll most definitely be implemented at some point. Right after I figured out how the (upcoming) preview function would work with it.

Also really, really sorry there has been no update today, I had less time on hand than I expected and it's largely due to me being completely hungover, as a small visit at the movies turned into a drink till 5 am kind of thing.
>>
File: bhihojöm.jpg (198 KB, 936x1280) Image search: [Google]
bhihojöm.jpg
198 KB, 936x1280
>>4292100
I also realized it would be nice if the images would be "righ click -> save"-able, so I changed the design a little so right clicking the middle 10% of the image will bring up the image context menu, instead of the "general page" context menu, I just didn't come up with a visualization for that, maybe it'll come, maybe it won't, but the functionality is now there.
>>
>>4292100
>>4292102
You're under absolutely no pressure to update to any schedule.
I really like this bookmarklet and check back daily, but I don't ever go "fuck this guy no update grrrr"
That said, thanks for all of the updates so far!
For randomisation, I just thought that it'd be nice to be able to go through the same thread that I particularly liked, but in a different order to which I fapped to it before.
Saveability is a nice idea - I've wanted to save stuff a few times but instead had to search for the image in the thread, so this is a nice convenience.
>>
File: 4chan_h_issue.png (51 KB, 1920x1050) Image search: [Google]
4chan_h_issue.png
51 KB, 1920x1050
>>4290397
Hey, I'm not >>4289928, but I'm also on chrome and this isn't working for me.

I created the bookmark, I will explain what is happening:
I`m in this tab, if I left click the bookmark nothing happens. If I middle click the bookmark pic happens.

I will show you chrome console in a sec.
>>
File: 4chan_h_issue_2.png (281 KB, 1920x1050) Image search: [Google]
4chan_h_issue_2.png
281 KB, 1920x1050
>>4290397
>>4292283
This is what shows up in chrome console (Ctrl+Shift+i)

P.S.: Chrome version seems to be 51.0.2704.84 m
>>
>>4292283
>>4292288
>>4290397
Fuck me, I was using the old code in the OP.

I tried with >>4289190 and seems to be working fine.

Thanks for this, may prove useful.
>>
>>4290397
Of course, do continue working on this. It's pretty useful.
>>
>>4292303
Thanks for putting up the screenshot anyways, it could have been something else I wasn't aware of.
I figure it was the ad-block issue, great that the update fixed it as intended.


On a general note: There will be another update today.
>>
File: ss (2016-06-09 at 06.38.17).jpg (543 KB, 1914x955) Image search: [Google]
ss (2016-06-09 at 06.38.17).jpg
543 KB, 1914x955
Here OP, i fixed your code

http://pastebin.com/ZbG6vPgs

its based on the first version though, but it shouldnt be that much work to incorporate the changes you've made in v2

changelog:
indentation and documentation
'separate' stylesheet for easier style editing
controls are now in a small bar on top of the screen
play buttons turn green when slideshow is playing
slideshow speed indicator
controls for speeding up/slowing down the slideshow
background is dimmed when active
picture fills the screen


known bugs:
shits borked when the browser window is in portrait instead of landscape


(this is how i spent my day off, doing what i would normally do except this time with chinese cartoon porn. Workaholic much?)
>>
>>4292949
OP here, getting
>Syntax Error: missing ; before statement
Looks really nice, though, I like the embedded style sheet, had no idea that could be done. Great to see someone helping out who actually seems to know his stuff.

Will post my (rushed) update to my original code (that can't really compete with yours, except for the error), because I don't have the time to work on it today (suddenly there's a birthday party I just can't not attend - damn social life, also that cute redhead will be there, wich is a plus).

http://pastebin.com/bQPYQW1z (not the better version anon provided)

fixed some bugs, added adjustable delay, buttons are now updated according to the state of the slide (play/pause/hide/show)

I'll look into anons code to fix the issue and I'm sure we'll then be using his code (hella organized, something I just am unable to), but until then, here's my amateur version.
>>
>>4292969
>>4292949
another update

http://pastebin.com/raw/x02ehQAh

changelog:
firefox support
webm support
buttons update according to state
arrow keys for slide selection, ESC to hide
and a shitton of code+syntax cleanup

because the file became so large, most browser no longer support it as a bookmarklet. this is easily fixed by bookmarking a script that fetches the main script and runs it. just add

javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://pastebin.com/raw/x02ehQAh';})();

as the URL of your bookmark
>>
>>4293292
minor bugfix

full script: http://pastebin.com/raw/pjNTxetM

bookmarklet url:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://pastebin.com/raw/pjNTxetM';})();
>>
>>4293302
OP here, nice one.
Just one thing: Catch the setTimeout in a variable, so you're able to reset the timeout when the slide is stopped, if you don't do that and dis- and enable the autoplay while the prior timeout still waits you create two "loops" and the images start skipping rapidly. My last own update has a fix for that, look into it if you don't know what I mean (strg+f for "clearTimeout(delaytmr);" , it's in the onclick function definition of the playpause element). Other than that, I like it way better than my own.
>>
>>4293302
>>4293340
another update

source: http://pastebin.com/raw/n5s3qkCF
bookmark this:

javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://pastebin.com/raw/n5s3qkCF';})();


changelog
the mentioned clearTimeout() issue is fixed
space for pause/play
now preloads the next 10 images/videos

this will probably be my last update, because my last exam is coming up.
>>
>>4298097
Good luck in your exam, OP.
>secretly hoping this is OP's CS assignment
>"A method of automated retrieval and time-dispersed graphical display of user-submitted content of oriental origin to induce sexual arousal in the viewer"
>>
File: 0078.jpg (62 KB, 480x640) Image search: [Google]
0078.jpg
62 KB, 480x640
>>4298097
Good luck OP!
(bumping for you)
>>
To the top you go!
>>
>>4298097
Thanks man, I've been looking for a decent 4chan slideshow for a few months now.
>>
>>4302315
>>
>>4304020
>>
i feel like im the only one that is going to ask this probably very stupid question...but dont i need to download something...i mean if you are posting updates to the chanslide then there must be something to download...and also i have java script enabled, but i cant find how to get the java script to copy into the location tab
>>
File: 1450382132835.jpg (428 KB, 566x800) Image search: [Google]
1450382132835.jpg
428 KB, 566x800
Bump while learning how this works.
>>
finals are over. here's an update

changelog:
default slide change interval down to 3 seconds
images will now show in original resolution or fit to screen, so extremely wide images will show up correctly
added an "open image" and "save image" button
swapped around some buttons to make more sense
deleted images no longer break everything
minus key now actually slows down the slideshow
hide/show button will turn red when the slide is hidden

source code:
http://pastebin.com/raw/EWYnLJUC

bookmark this:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://pastebin.com/raw/EWYnLJUC';})();


>>4307636
Its a bookmarklet, basically instead of having a URL as a bookmark there's javascript code. The browser realises this and will run it, its an easy way to make smallish browser extensions. Every browser normally has some kind of bookmark management page, in there you should be able to manually enter a location for your bookmarks.
>>
>>4309690
another update

changelog:
alert when trying to launch chanslide while it is already running
controls now show the current image and the total amount of images
clicking the current speed opens a prompt where you can pick the slide interval yourself
clicking the index opens a prompt where you can pick the slide that you want to go to
added a ton of keyboard shortcuts (including but not limited to vim shortcuts and numpad shortcuts)
fixed a small bug that allowed the slide interval to be set to zero

source code:
http://pastebin.com/raw/gGNfeNka

bookmark this:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://pastebin.com/raw/gGNfeNka';})();
>>
>>4309722
and another update

changelog:
the "go to post" button now shows the amount of replies that a post has.
the reply count turns yellow when a post has 5 or more replies

source code:
http://pastebin.com/raw/HBbGzuNB

bookmark this:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://pastebin.com/raw/HBbGzuNB';})();
>>
>>4288147
This exists for the firefox crowd: https://addons.mozilla.org/en-US/firefox/addon/image-forward/

Here's some JS to get a slideshow going

To begin a slideshow of 7 seconds:
pop = setInterval("gImageForward.iterateImageLinks()", 7000);

To end the slideshow:
clearInterval(pop);

You can edit the formats it will load in about:config
>>
>>4288147
How the fuck is a bookmarklet 'more secure' than a stand-alone piece of software or a browser plugin, especially when there's not even any fucking credentials involved here.
>>
>>4310401
Because it can't do anything that the web page itself can't, whereas browser plug-ins and programs have pretty much full access on most systems
>>
how do you set site?
>>
>>4314601
>*clearing this up
I see the interface, but I can't pick a thread to start the show. How do I do this?
>>
Hi OP, I like this.

however, there's only one way to load this on a thread, and that is to load it via console.

Also, It appears to run if I want to reply to a thread, like what I'm doing right now.
>>
>>4315512
This, and .endswith function doesn't work on older browsers.
Thread replies: 67
Thread images: 29

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.