Two reasons why I uninstalled facebook application and Facebook messenger from my mobile

Reason 1

Facebook recently pushed an update of their application, which requires a lot of additional permissions.

I tried to upgrade facebook application on my mobile, and got worried to see the permissions they are asking to run this application.

Take a look at this picture. I took 4 screenshots and combined together to get a single image.

Have a closer look at the permissions which is marked in red. Continue reading “Two reasons why I uninstalled facebook application and Facebook messenger from my mobile”

Set multiple css style properties in Javascript

In three different methods you can set multiple style properties to an element using javascript.

for example, consider, you want to apply colour, border colour and visiblity to an element with id myElement

Method 1

document.getElementById("myElement").style.color = "#000";

document.getElementById("myElement").style.borderColor = "blue";

document.getElementById("myElement").style.visiblity = "visible";

Method 2

document.getElementById("myElement").style.cssText = "color: #000; border-color: blue; visibility: visible";

Now, the above step is going to replace the existing inline style. If you want to keep existing inline style and add these styles additionally, here is the trick

document.getElementById("myElement").style.cssText +=';'+ "color: #000; border-color: blue; visibility: visible";

Method 3

document.getElementById("demo").setAttribute("style",  "color: #000; border-color: blue; visibility: visible");