Note: If you're on Android, you'll need to use one of the alternative browsers, like Kiwi Browser, to install Violentmonkey's Chrome extension.
Changes:
v0.8
- Attempt work-around for FireFox intermittently not working.
v0.7
- Work-around issue with FireFox (Should work on FireFox on desktop/PC now.)
v0.6
- Fix issue with Kiwi Brower on Android.
v0.5
- Allow use of gifs/webp by simply renaming the file extension to mp3. Userscript will then allow use of these "mp3s" as images. (No need to embed gif as base64.)
- Add more animated images, since there's plenty of room for them.
- Add asynchronous image preloading.
Please let me know if you think this kind of thing is worth the effort.
Last edited by fapnip on Sat Feb 26, 2022 7:34 pm, edited 11 times in total.
Hey that was really cool! I first tried it with the extension "Tampermonkey" which I already had installed, but it didn't work.
I'd welcome an easier way to implement gifs into Eos (and other features too). Through this method, is there any way someone like me (who has probably less than basic coding experience) can use this to make my own teases? Is it the code in the extension making everything happen, or did the code in the extension add an extra module to the Eos editor so you can do this?
It is a great idea and can provide many amazing new features.
The problem I see is that it is very dependend on the internal workings of EOS. Some changes it teases like that stop working.
kerkersklave wrote: Fri Oct 16, 2020 11:49 pm
It is a great idea and can provide many amazing new features.
The problem I see is that it is very dependend on the internal workings of EOS. Some changes it teases like that stop working.
Yes, though then it's just a matter of updating the userscript. And hopefully a new EOS version would bring some of the more popular userscript added features with it ;)
That said, it would take some relatively large changes to EOS to break the module. I'd be more concerned with too many base64 encoded animated gifs embedded in tease scripts eventually breaking EOS. (Bloat the database.)
Here's an alternate demo that is basically the same as the original, but to work-around the inability to upload GIFs to EOS, this one pulls the animated gif from the album cover in the ID3 tag of an mp3 audio file instead of a giant base64 string embedded in the tease script: https://milovana.com/webteases/showteas ... 4f352544cd
EDIT: These changes have been merged with the original. This test link will likely be broken as I test new things on it.
Last edited by fapnip on Thu Oct 22, 2020 1:24 pm, edited 1 time in total.
great work so far. I am also working on a script for Eos and failed to access the audio API. So your idea is just perfect. I was able to integrate my code and address it from EOS, but I failed to implement events or callbacks. Do you have an idea how to implement that?
astaria715 wrote: Sat Oct 17, 2020 1:22 pm but I failed to implement events or callbacks. Do you have an idea how to implement that?
Yes, the core of my userscript can handle sending events to EOS. (And can be re-purposed for other extensions.) An earlier version of it does just that to get the user's IP address: viewtopic.php?p=288678#p288678 (See both the example tease and the userscript.)
Note: You can't send a payload in the event other than the event type. You'll want to add a getter function to your extension that will allow your EOS code to listen for the event, then query the data you need via the getter.
My intent, if I decide to continue, is to build both this Dynamic Image extension (expanding it's features and fixing many existing bug), allowing EOS authors to leverage its features without having to write their own userscript, and to build a core EOS userscript library that others can use as a foundation to build their own EOS extensions.
My intent, if I decide to continue, is to build both this Dynamic Image extension (expanding it's features and fixing many existing bug), allowing EOS authors to leverage its features without having to write their own userscript, and to build a core EOS userscript library that others can use as a foundation to build their own EOS extensions.
That would be awesome! Especially as changes to EOS might break those extensions. It would be good if the user only had to update the "SDK" and not every single UserScript. This becomes especially relevant in the long run, when not every UserScript is actively maintained.
fapnip wrote: Sun Oct 18, 2020 6:29 pm
Script has been updated to work with FireFox now.
I installed the extension and script on Firefox, but the tease claims it's not installed. I see the monkey with a "1" by it indicating it "sees" the tease (I think that's what it means). Is anyone else having this issue with Firefox?
Trusfrated wrote: Wed Oct 21, 2020 5:04 am
I installed the extension and script on Firefox, but the tease claims it's not installed. I see the monkey with a "1" by it indicating it "sees" the tease (I think that's what it means). Is anyone else having this issue with Firefox?
Added a work-around in hopes that it fixes it. Also added more debugging output.
Please give the updated userscript a try, and even if it does work, please post the output of your browser's console window after the tease loads. Should look something like:
Installing EOS Dynamic Images v0.8 on milovana.com
Installing EOS Dynamic Images v0.8 on eosscript.com
Waiting for eosContainer...
Hooking Interpereter Run
loaded module: audio
Intercepting Interpereter Run
Installing EOS Dynamic Images modules...
Loaded 3rd party module: DynamicImage
fapnip wrote: Wed Oct 21, 2020 7:56 pm
Please give the updated userscript a try, and even if it does work, please post the output of your browser's console window after the tease loads.
Thanks fapnip. I think this is probably the output you're looking for:
Installing EOS Dynamic Images v0.8 on milovana.com EOS Dynamic Images.user.js:154:20
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). injected.js:1:5301
Some cookies are misusing the recommended “SameSite“ attribute 3
Installing EOS Dynamic Images v0.8 on eosscript.com EOS Dynamic Images.user.js:154:20
Waiting for eosContainer... EOS Dynamic Images.user.js:193:24
Hooking Interpereter Run EOS Dynamic Images.user.js:175:24
loaded module: audio EosHost.js:119:12
vm: Checking if dynamicImage is installed console.js:14:10
Happy to help if you want me to try something else. Feel free to PM me if you want to take this out of the thread.