Introduction
This post is about a quick hack, that I was able to get working after learning and developing all day long today. The thing is pretty simple, “Microsoft provides a Bookmark and I hate bookmarks”. Sadly, I was not able to ask Microsoft to upgrade it. Thus, I thought, I should consider working that out myself. I am a regular Chrome user and instead of using the bookmarks, I consider using extensions a lot and when Microsoft provided me with a button, I thought it was an extension, but it was a bookmark URL (having JavaScript code).
If you had thought of the same, of having an extension to your browser, instead of using that bookmark link, this post is for you! Although there are many Web Browsers, I am only going to cover Google Chrome, Opera Browser, and Mozilla Firefox. I was also looking for Microsoft Edge’s API for extensions, but sadly it is under construction.
Microsoft provided a script, that runs and loads an iframe and then provides access to the authenticated Web page, where you will enter the details. Instead of loading the script from a bookmark URL, I changed it to be an extension. Under this bookmark button, the JavaScript link is:
Dissecting the tool
- // Added indentation for readability
- javascript:
- (function(){
- if(window.myBookmarklet!==undefined) {
- myBookmarklet();
- } else {
- document.body.appendChild(document.createElement('script'))
- .src = 'https://mvp.microsoft.com/Content/Scripts/bookmarklet.js?';
- }
- })();
- Do not use this extension, if you are not a Microsoft MVP. It is of no use to you but you can still read the article to learn how to build the extensions.
- Microsoft has the right to authorize who has access and who has not. You can use the tool and Microsoft will provide you with the sign-in form to authorize yourself.
- These are not live. I was not interested in paying $5 to Google for the authorization of my account. You can use it and by the end of this post, I will show you how to add this extension.
- There is no malware in the extension. The source code is open and you are however going to use that “as-it-is” source code. Hence, don’t worry about anything phishy.
- The procedure just turned the bookmark to an extension. Nothing was changed.
- I hope Microsoft doesn’t mind.
Building extensions for browsers
- A manifest file
- A script file
The rest of the stuff is not required; such as HTML and CSS files. We also don’t need to confuse things a lot, so only the manifest and the script file would work. I am going to use Chrome Dev Editor; the full-featured IDE for building Chrome apps, using JavaScript or Dart and it also has the Polymer GUI editor.
Source code for this is as follows:

- {
- "name": "Submit Community Activity",
- "description": "Allows Microsoft MVPs to submit their community activity easily. *Do not use if you are not a Microsoft MVP*",
- "version": "1.0",
- "permissions": [
- "activeTab",
- "tabs"
- ],
- "background": {
- "scripts": ["background.js"],
- "persistent": false
- },
- "browser_action": {
- "default_title": "Submit Community Activity (For Microsoft MVPs only)",
- "default_icon": "/assets/icon_100.png"
- },
- "manifest_version": 2
- }




RakeshPosted Jul 20, 2016, 12:50 PM
Good share
kalu singh raoPosted Jul 20, 2016, 2:30 AM
Nice Share