Skip to content

Author: admin@master

Detect when “Inspect Element” is open

Samy Kamkar’s website, http://samy.pl, knows when the console is being opened and wipes the source/console when it does open. How does this work? Answer This took some digging. samy.pl has several levels of indirection and obfuscation on top of this code. It uses a different version of the detection cod…

Rethrowing error in promise catch

I found the following code in a tutorial: I’m a bit confused: does the catch call accomplish anything? It seems to me that it doesn’t have any effect, since it simply throws the same error that was caught. I base this on how a regular try/catch works. Answer There is no point to a naked catch and …

Vue.js – components data do not update

I have a Vue list that is based of an array and each array item renders a component where I bind the array item properties. This component has a mixed data, based on the binded properties The problem is that when I change the initial list array in any way, the mixed prop of the component maintains it’s …

Pug file not loading CSS

I’ve got an express project set up. I’m using Pug as the view engine. I’ve got the following lines in my app.js, And I’ve got the following in my index.pug view, The CSS files are in the right folders (public/stylesheets), but when I load up the app, the view does not seem to load the …