This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Google Chrome Extension Numbers on the Icon
So I'm developing a chrome extension and I would like to put a number on the icon. I'm assuming this is done through the canvas element but I can't find any examples. Anyone have an example they want to share?
The number is called a "badge", and you can use up to four characters: http://code.google.com/chrome/extensions/browserAction.html
Call setBadgeText() to change it.
Related
This question already has answers here:
What does ==$0 (double equals dollar zero) mean in Chrome Developer Tools?
(5 answers)
Closed 6 years ago.
I found a button in the google cloud front end that uses this syntax and I was just wondering what it is all about... Thanks for the input!
I love design patterns and have been getting more into web development lately so forgive me if this is a really basic question!
That's just the element inspector of your browser. It means in the browser's Javascript console, you can now type $0 and get an object that refers to your currently highlighted element. It's a handy shortcut for directly debugging DOM elements interactively.
It's not HTML, it's not even actually part of the web page, it's not specific to that button, it's not a design pattern.
This question already has answers here:
How to mark-up phone numbers?
(14 answers)
Closed 8 years ago.
Is there any way using html and/or JS to link an image so that it makes a phone call. Similar to the mailto: links. This would just make life a lot easier if this was possible. Say if a person had skype, could a button then open skype for them and call a number?
Thanks in advance
like this:
Call us free!
you can look also on this article
add-telephone-number-links-with-html
Presuming that desktop userd use skype,
Call 579-827-0034
This question already has answers here:
Chrome extension - retrieving global variable from webpage
(5 answers)
Closed 8 years ago.
How can I access a window variable from a chrome extension?
For example, I want my extension to just log window.variable?
Is this at all possible?
You need to inject the script at runtime (as opposed to doing it from the content script).
From the injected script use either messages to pass it to the extension, or (easier) write what you need in a DOM element and read it from the DOM (but changing the dom might break the original page)
In the official samples shows how to inject the script by writting a tag.
I know this is a dup of the pointed gmail question but that question has a title that makes it hard to know its about injected scripts.
This question already has answers here:
JavaScript get clipboard data on paste event (Cross browser)
(22 answers)
Closed 9 years ago.
I want a user to highlight a part of a web page and paste it into a textbox on my site. But I want the formatting from the original site to be preserved somehow. So I want to copy more than just text. Gmail seems to be able to do this when composing an email.
I don't know where to begin with this problem. Any thoughts?
If you have windows7 use the snipping tool and cut it from the screen as a .jpg.
Then use simple html
<img src="sth.jpg" alt="sth" height="" width="">
This question already has answers here:
Modify HTML of loaded pages using chrome extensions
(2 answers)
Closed 6 years ago.
I'm new to Chrome extension development, my first project (to learn) is to create an extension that adds some html to another website's existing page.
I plan on creating a 'page' action which fires for a page with a certain URL...
Has anyone seen a tutorial like this, or do you know of an API for adding html to a page?
You can find some example at Google Sample Extension page, however your question seems better answered on this other question.
There are a number of sample extensions on the Chrome extension API site. There are a couple of browserAction examples that will be almost identical to using pageAction.