Skip to content

Author: admin@master

Save json string to client pc (using HTML5 API)

I read few older thread about the same, but seen the file API changed a lot recently. My requirement is to save a json file (data is locally in indexdDB, but I need a way to back it up). Since I use indexdDB, I only target recent browsers, mainly chrome. So, it it possible to save data (json string) to

Add class to li if content is a certain string

Would it be possible to add a certain class to a li that contains a certain string of text using JavaScript/jQuery? UPDATE/NEW QUESTION: Instead of detecting the content of the li, can I have it add the class if the li has another specified class? Answer Answering the fellow’s extended question: You&#82…

Creating a BLOB from a Base64 string in JavaScript

I have Base64-encoded binary data in a string: I would like to create a blob: URL containing this data and display it to the user: I haven’t been been able to figure out how to create the BLOB. In some cases I am able to avoid this by using a data: URL instead: However, in most cases the data: URLs