How to create a small bookmarklet tool for Web to QR Code?
javascript: (function() {
var url = ('http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=' + encodeURIComponent(location.href));
w = open(url, 'w', 'location=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=500,height=500,modal=yes,dependent=yes');
if (w) {
setTimeout('w.focus()', 1000)
} else {
location = url
}
})();
How to use a small bookmarklet tool for Web to QR Code?
A bookmarklet is essentially a bookmark with embedded JavaScript code that can be executed in a web browser.Decide on the JavaScript code you want to execute within the bookmarklet. This could involve performing specific actions, modifying the current page, or loading additional resources.
Create a new bookmark within your browser. This usually involves right-clicking on your bookmarks/favorites bar and selecting "Add new bookmark." In this step, you'll need to specify a name and location for the bookmark.Edit the newly created bookmark and paste the JavaScript code into the URL or location field of the bookmark. This is the core part of the bookmarklet.
Open a webpage and click on the new bookmarklet in your browser's bookmarks bar to execute the JavaScript code it contains. Ensure that the bookmarklet performs the expected actions.