How to Add href or Link to console.message
Thanks a lot for this console script, but I have an issue. Anytime I add .element('feedback') to console.message(). It still repeat the same way in the console. How do add a link to it below is my code:
console.message() .span({ fontWeight: 'normal'}) .text('Please don't copy-paste something or hack here!', {background: 'red', color: 'white',fontWeight: 'bold',fontSize: 15 }) .element('feedback') .spanEnd() .print();
.element() method expects HTMLElement instance. You could do console.message().element(document.querySelector('CSS selector here')).print()
What do you mean "add a link to it"?
What I meant by add a link is: an hyperlink or href
Unfortunately, this isn't supported by the browser console APIs. I can make a utility function that only colors the link but it still won't be possible to click it. Closing this.
Sorry for the delayed answer 😂. I didn't commit to this repo for the past 8 years. Now I've started working on it all over again.