-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Set default settings in "init" #141
Comments
version 2.4.0 eruda.init({
defaults: {
displaySize: 50,
transparency: 0.9,
theme: 'Monokai Pro'
}
}) |
@surunzi Excuse me, All right,i got it! eruda.util.evalCss.setTheme('Dark') |
is it possible to set more than just those 3 settings? if so, how are they initialized (i.e. what they're called or something)? |
@surunzi In the latest version 2.11.3 I would like to change the size of diplay to 50, but I don't know where to put it in the new version. Can you help me? Where I place javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })(); Edit: Now I know how, adding the code between the brackets after eruda.init javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init({defaults: {displaySize: 50, theme: 'Monokai Pro'}}) } })(); |
A nice enhancement for this project could be the possibility to set custom default settings while initializing eruda, by adding a
settings
object next tocontainer
andtool
. It could contain key/value pairs such astheme: 'Monokai Pro'
anddisplay-size: 50
etc.The text was updated successfully, but these errors were encountered: