Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Octomments - using GitHub as a comment plugin

posted in JavaScript on 2020-01-31   octomments github comments github comments github issues server issues comment https github krasimir octomments https repo app

87% of my readers are using Chrome on desktop. This means that I have the luxury to care less about performance. However I just recently found that this blog has 56 (out of 100) points on Google's pagespeed test. That's not good. The report says that my Disqus comments are blocking the main thread for ~900ms. I want comments on my blog but I also want my users to reach to content as quickly as possible. So, after so many years using Disqus I decided to break with it and use something else.

read more

JavaScript: bind function

posted in JavaScript on 2014-03-09   function bind prototype comments fullname var scope user call arguments

The this keyword is always important in JavaScript. I'll admit that it took me some time to actually understand how it works. You know, sometimes JavaScript is all about the scope. Where you are and what you have an access to. This article is about the bind function. Something which I use very often.

read more

PHP: Simple javascript obfuscator (merging files)

posted in PHP on 2010-12-30   jsstr jsstr jsstr str_replace jsstr str_replace jsstr str_replace jsstr jsstr js files fh file comment js core plugins

Currently I'm working on a big JavaScript project. It has a lot of files that have to be compressed. I wrote a simple php class that merges all the files into one. It has also a useful simple obfuscator method.

read more