Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adverts #7

Closed
Scoffins opened this issue Aug 3, 2021 · 11 comments
Closed

Adverts #7

Scoffins opened this issue Aug 3, 2021 · 11 comments
Labels
enhancement New feature or request

Comments

@Scoffins
Copy link

Scoffins commented Aug 3, 2021

How would one add their own adverts into this? The same way EmulatorJS.com did it.

@Scoffins
Copy link
Author

Scoffins commented Aug 3, 2021

Ended up writing my own script which overlays a div in the center of the emulator container until the user closes it.

@ethanaobrien
Copy link
Member

ethanaobrien commented Aug 3, 2021 via email

@Scoffins
Copy link
Author

Scoffins commented Aug 3, 2021

Okay that'd be great :)
IMO you've got a very good project going here, there's not much else to compare. It's simple, elegant and just works without any hassle. I really hope all the legalities are covered because I want to see this project succeed long-term. I believe it's a valuable set of tools which will prove very useful for developers in the future. Don't let it go stale, keep up with it :) I also think it might be worth uploading the unobfuscated code. There are many online tools to help here, the best I've found is this one: https://codeamaze.com/code-beautifier/javascript-deobfuscator

Thank you for all your work, it's very much appreciated!

@Scoffins
Copy link
Author

Scoffins commented Aug 3, 2021

Ended up writing my own script which overlays a div in the center of the emulator container until the user closes it.

<div style="width:640px;height:480px;max-width:100%;margin:0 auto;position:relative;">
    
<div style="width:300px;height:300px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:#FFFFFF;z-index:999;" id="gameadvert">
<a onclick="document.getElementById('gameadvert').remove();" style="float:right;font-size:18px;font-weight:bold;cursor:pointer;padding:5px;" title="Close Advert">❌</a>
<!-- INSERT AD CODE HERE !-->
</div>

<div id="game"></div>
</div>

@ethanaobrien
Copy link
Member

ethanaobrien commented Aug 3, 2021 via email

@ethanaobrien
Copy link
Member

@Scoffins

I unobfuscated the emulator.js file. It is now human readable and human editable!

@xxxnewbiexxx
Copy link

xxxnewbiexxx commented Oct 28, 2021

Hi @ethanaobrien, could you please share with us the ads code you removed from the script?

Thank you!

@ethanaobrien ethanaobrien added the enhancement New feature or request label Nov 23, 2021
@xxxnewbiexxx
Copy link

Cool, this is basically what emulatorjs does. When I get time to update it. I will create a branch that has you just put the URL to the ad.html

This would be great!

@ethanaobrien
Copy link
Member

@Scoffins @xxxnewbiexxx

Feature implemented
add the following line to the example code

EJS_AdUrl = '' //path to AD page

@xxxnewbiexxx
Copy link

Thanks @ethanaobrien !

@ethanaobrien
Copy link
Member

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants