Introduction
I have created a TamperMonkey script that enables you to use the handy directly on pornhub by uploading a script for the video you’re on.
Preview
(Beautiful HTML, i know)
Script
NodudeWasTaken/theHandy_Web (github.com)
New version 1.6 introduces custom website support, and new bugs probably.
Backported some changes from @jabiim for version 1.3 (thanks )
Details
It works by you firstly selecting a script.
Then entering a handy key, and pressing enter.
And if all goes well, the circle turns green and you’re ready.
Setup guide:
- Install Tampermonkey (https://www.tampermonkey.net/)
- Click the Tampermonkey icon in the top right
- Click “Create a new script”
- Replace the text in the editor with the text from my github “script.js”
- Press Ctrl-S
- Done
Usage guide:
Be aware that Tampermonkey WILL ask you to allow the script to use GM_xmlhttpRequest, allow it.
- Go to a pornhub video that you have a script for
- Press “Browse…”
- Select your funscript
- The handy key textbox should be enabled now, otherwise try again
- Enter your handy key in it
- Turn on the handy and connect it
- Press enter in the textbox and wait for a syncPrepare message
- If everything went well the circle would have turned green
If syncPrepare failed, try entering the textbox and pressing enter again
You can also set the offset in the offset textbox by entering a value like -10 or 10 and pressing enter, you should see a syncOffset message from this.
Contributing
If you want to add other sites, you need to know regex and xpath
In my github i have a data.json, where each entry has a url match and xpath for video element.
The url regex is matched against the javascript window.location.href and encoded in encodeURIComponent.
decodeURIComponent("https%3A%2F%2F.*.pornhub.com%2Fview_video..*%3Fviewkey%3D.*") = 'https://.*.pornhub.com/view_video..*?viewkey=.*'
RegExp("https://.*.pornhub.com/view_video..*?viewkey=.*").test("https://www.pornhub.com/view_video.php?viewkey=ph5e843a0b16c7f") = true
Just submit a pull request for any new websites you’ve added, and also if you want to change the codebase, like fixing the z-index bug on spankbang