Tag: JavaScript

Clear EVM Wallet

I made this wallet in the course of two weeks based on Ethers, Ionic and Vue. Right now, it is built solely as a chrome extension wallet, but I used Ionic in case I will make later from the same code base a mobile/desktop variant.

It implements Metamask API and should work with most websites. I used my main address to do a few transactions on Polygon, Optimism, and Gnosis.

It has a nice set of refreshing features, like wiping all data, controlling all security settings, and importing or exporting a JSON with accounts.

It will work only with private keys and doesn’t accept seeds like other wallets. View full article

Deno Deploy Thoughts

This is some old draft article that I didn’t want to trash, so I’ll try to at least partially salvage it.

I played a bit with Deno deploy a while back, and I must say quite impressive that using Deno deploy is very easy to fast spawn a serverless worker, similar to a Cloudflare worker.

If I were to deploy something on a large scale where serverless workers could be a suitable environment as a replacement for a different backend set-up, and I had to choose a paid service, I would probably go with Cloudflare only because it allows the worker to be written in several languages, and thus gives you better flexibility.  View full article

Load WP post with JS Fetch

If you want to load the post faster you can use JS to fetch your post, but on modern browsers probably preloading pages will be faster, the only drawback of preloading is that you’ll consume storage for your visitors even if they don’t visit the preloaded links, also with preloading links you will consume more bandwidth and resources on the server-side.

So if you want to stick with fetching with JS here is an example, but first, as a note, the example will not use the default REST API mostly because the default API only returns the content title and other attributes of the post and, we want to add things like Yoast data(without making two API request) also, in this case, will transfer some of the article template surrounding the content. View full article

Don’t include external JS for custom content example Goodreads

On many websites, you can have content embedded from other sites and one way that most external sites will offer will be to include a script that’s hosted on their website.

But if all that script does is including some remote content there are better ways to get that, that will provide customizations and performance.

For example, the website Goodreads offers such an embed JS with a list of the latest books you read, and you must include the script where you want the content to be shown. But that has a long list of drawbacks: the script uses the old API document.write, is a script and can’t be loaded in AMP, the scripts write very old style HTML with tags like center, attributes like border which again is not valid AMP, then also that script will be loaded for every request, so you’ll have one additional request. View full article