artoo icon indicating copy to clipboard operation
artoo copied to clipboard

Remove artoo logo from console log

Open angeloh opened this issue 10 years ago • 12 comments

I am creating a chrome extension using Artoo. However, I don't want this artoo logo output to console. How can I turn it off? I already have artoo.settings.log.enabled = false.

https://www.dropbox.com/s/o607kbsi0nf32qe/Screenshot%202015-07-11%2022.05.27.png?dl=0

angeloh avatar Jul 12 '15 05:07 angeloh

Can you try to set artoo.settings.log.welcome to false (I mean in the bookmarklet configuration, not at runtime in the script because else the setting won't be applied soon enough and the logo will be displayed).

Yomguithereal avatar Jul 12 '15 09:07 Yomguithereal

For chrome extension, should I put it in content script? I am not using bookmarklet. Thank you.

angeloh avatar Jul 12 '15 17:07 angeloh

If you are creating a chrome extension then yes, you should probably inject artoo along with a content script. You can check this folder to see how the artoo chrome extension works and see whether it can help you.

Yomguithereal avatar Jul 13 '15 12:07 Yomguithereal

@Yomguithereal I mean where should I set artoo.settings.log.welcome to false if I am creating a chrome extension?

angeloh avatar Jul 13 '15 18:07 angeloh

@Yomguithereal I can't see any use of artoo.settings.log from the folder you pointed to me.

angeloh avatar Jul 16 '15 13:07 angeloh

artoo will get its settings from the settings attribute on its attachment node when loaded. Just JSON.stringify those so they can pass as an HTML string attribute. You've got an example of it here.

Yomguithereal avatar Jul 16 '15 14:07 Yomguithereal

But I really need to change this to make extensions etc. easier to develop.

Yomguithereal avatar Jul 16 '15 14:07 Yomguithereal

In the background.html, this is what I am doing.

<script src="js/libs/artoo.min.js" settings='{"log":{"enabled":false}}'></script>

But I still can see artoo robot image in the background script output.

angeloh avatar Jul 30 '15 23:07 angeloh

Can you try?

<script src="js/libs/artoo.min.js" settings='{"log":{"enabled":false, "welcome": false}}'></script>

Yomguithereal avatar Jul 31 '15 08:07 Yomguithereal

Thanks. But it doesn't work.

angeloh avatar Jul 31 '15 16:07 angeloh

Any update on this issue? Is it possible that you can provide a version without the mascot print?

angeloh avatar Aug 06 '15 14:08 angeloh

Ok, I am sorry I did not see that before but you forgot to give the proper artoo_injected_script id to your script:

<script id="artoo_injected_script" src="js/libs/artoo.min.js" settings='{"log":{"enabled":false, "welcome": false}}'></script>

Normally this should work.

Yomguithereal avatar Aug 12 '15 13:08 Yomguithereal