Fiddling with HypnoHub's code
Since Kinkyloli is contributing so much to the community, I wanted to give something too!
And what I like is writing some code.
Seemingly my previous post on <<hypnohub.net/forum/show/541|the other thread>> has gone unnoticed, so here I quote it:
Thing is, you can host your own clone of HypnoHub's software (MyImoutoBooru) on your machine (that package is for Windows, but it can run on other OSs like Linux too), and try out whatever you want.
I have just developed something which IMHO you guys could include in the site: hover previews!
Javascript file: gist.github.com/anonymous/6501329
My code adds a link to the bottom of the page, allowing you to enable or disable its functionality (just in case), and it's stored in a cookie. It is disabled by default when you load the script.
Screenshot: i.imgur.com/55QoEy5.png
Now, when you hover over an image, you'll see it highlight itself lightly (indicating that it's zoomable), and after a small delay (configurable), currently set to 300 milliseconds (so that it doesn't go zooming just by passing by with the mouse), it will fade the page slightly and show the image, as big as possible but made to fit the browser window, centered.
Screenshot: i.imgur.com/IEQShdc.png
If you want to test the script, copy and paste <<gist.github.com/anonymous...77/hypnohub-hover-zoom.js|its contents>> to a Javascript console (<<webmasters.stackexchange....ole-in-different-browsers|how to open the javascript console of your browser>>) and click the link added to the footer navigation bar to enable it.
This will only last while the page isn't refreshed, so if we want it to always be there, it would have to be added by one of the admins as an asset (I can give instructions).
In the future, I want it to handle text links too, like "post #9516", but first I want to know you guys' opinion.
PS: Tested on Firefox, Chrome, Opera, and IE8-10
And what I like is writing some code.
Seemingly my previous post on <<hypnohub.net/forum/show/541|the other thread>> has gone unnoticed, so here I quote it:
Stem_Cell said:
No problem.
Actually, since I see it as something so simple to do and it's beneficial for you or another person (even me) to fiddle with this openly, I've made a simple package with it already set up.
h2. How to use it
* Download <<www.mediafire.com/downloa...ith-my-imouto-portable.7z|this 7z archive>> and extract it to a root drive, like "C:\xampp" (can also be an USB drive).
* Run xampp-control.exe and click "start" for apache, then mysql. Allow them network access if asked.
* Navigate to localhost with your web browser, and choose admin account.
As you can see, easy as pie.
<<i.imgur.com/z77S4xJ.png|Screenshot>>, padded with obligatory desktop background.
h3. Furthermore:
* I've stripped down the default XAMPP install, so it's lighter, but xampp-control.exe gives some warnings that you can safely ignore.
* If you want to edit files, go to X:\xampp\myimouto, where X: is the drive where it's located.
* If you want to play with the database, navigate to localhost/phpmyadmin
* This is a portable build. You can take it anywhere, and it doesn't do anything to your system or registry.
* ...but it has to run from a root drive like that. You can swap drive letters though.
* Man, 7z compression kicks rar's ass.
<<tiny.cc/mega-link|Alternate link>> just in case.
No problem.
Actually, since I see it as something so simple to do and it's beneficial for you or another person (even me) to fiddle with this openly, I've made a simple package with it already set up.
h2. How to use it
* Download <<www.mediafire.com/downloa...ith-my-imouto-portable.7z|this 7z archive>> and extract it to a root drive, like "C:\xampp" (can also be an USB drive).
* Run xampp-control.exe and click "start" for apache, then mysql. Allow them network access if asked.
* Navigate to localhost with your web browser, and choose admin account.
As you can see, easy as pie.
<<i.imgur.com/z77S4xJ.png|Screenshot>>, padded with obligatory desktop background.
h3. Furthermore:
* I've stripped down the default XAMPP install, so it's lighter, but xampp-control.exe gives some warnings that you can safely ignore.
* If you want to edit files, go to X:\xampp\myimouto, where X: is the drive where it's located.
* If you want to play with the database, navigate to localhost/phpmyadmin
* This is a portable build. You can take it anywhere, and it doesn't do anything to your system or registry.
* ...but it has to run from a root drive like that. You can swap drive letters though.
* Man, 7z compression kicks rar's ass.
<<tiny.cc/mega-link|Alternate link>> just in case.
Thing is, you can host your own clone of HypnoHub's software (MyImoutoBooru) on your machine (that package is for Windows, but it can run on other OSs like Linux too), and try out whatever you want.
I have just developed something which IMHO you guys could include in the site: hover previews!
Javascript file: gist.github.com/anonymous/6501329
My code adds a link to the bottom of the page, allowing you to enable or disable its functionality (just in case), and it's stored in a cookie. It is disabled by default when you load the script.
Screenshot: i.imgur.com/55QoEy5.png
Now, when you hover over an image, you'll see it highlight itself lightly (indicating that it's zoomable), and after a small delay (configurable), currently set to 300 milliseconds (so that it doesn't go zooming just by passing by with the mouse), it will fade the page slightly and show the image, as big as possible but made to fit the browser window, centered.
Screenshot: i.imgur.com/IEQShdc.png
If you want to test the script, copy and paste <<gist.github.com/anonymous...77/hypnohub-hover-zoom.js|its contents>> to a Javascript console (<<webmasters.stackexchange....ole-in-different-browsers|how to open the javascript console of your browser>>) and click the link added to the footer navigation bar to enable it.
This will only last while the page isn't refreshed, so if we want it to always be there, it would have to be added by one of the admins as an asset (I can give instructions).
In the future, I want it to handle text links too, like "post #9516", but first I want to know you guys' opinion.
PS: Tested on Firefox, Chrome, Opera, and IE8-10