Optimize website to show reader view in Firefox

As the code stands in May ’20 the trigger function (isProbablyReaderable) scores only p or pre elements and div elements that contain at least one decedent br. A slight oversimplification of the scoring heuristic is: For each element in [‘p’, ‘pre’, ‘div > br’]: If textContent length is > 140 chars, increase score by sqrt(length … Read more

Add-on “appears to be corrupt” when trying to install my add-on’s .xpi file in Firefox

The .xpi file must use only “deflate” compression or uncompressed The zip implementation within Firefox only supports uncompressed files or files compressed with the “Deflate” algorithm. You will need to create the .zip archive using the compression method “Deflate” instead of the “LZMA” which you are currently using. How to do so will depend on … Read more

How to set placeholder text color on Firefox

Add opacity: 1 to the Firefox placeholders. input#myinput::-webkit-input-placeholder { color:#FFF; background-color:#CCC; } input#myinput::-moz-placeholder { color:#FFF; background-color:#CCC; opacity: 1; } input#myinput:-moz-placeholder { color:#FFF; background-color:#CCC; opacity: 1; } input#myinput::-ms-input-placeholder { /* IE10+ */ color:#FFF; background-color:#CCC; } input[type=”text”]{ width:170px; height:16px; padding:12px 5px; border:none; color:#848484; font:14px/14px ‘Arial’, Helvetica, sans-serif; text-align:center; background-color:#CCC; } <input id=”myinput” type=”text” placeholder=”my placeholder” maxlength=”30″ name=”myplaceholder”> … Read more

MouseEvent.path equivalent in Firefox & Safari

It’s not available, but if you really would like to have this property, then you could extend the native prototype of the Event object like so: if (!(“path” in Event.prototype)) Object.defineProperty(Event.prototype, “path”, { get: function() { var path = []; var currentElem = this.target; while (currentElem) { path.push(currentElem); currentElem = currentElem.parentElement; } if (path.indexOf(window) === … Read more

Content Security Policy: Couldn’t parse invalid source chrome-extension

I solved this same problem for myself after recently posting it as a Facebook bug on https://developers.facebook.com/x/bugs/729597157070762/ With FB’s help I noticed the following unwanted browser extensions in Firefox: Searchme, Slick Savings, Amazon Shopping Assistant, and Ebay Shopping Assistant. Turns out these are essentially malware that effected Firefox, Safari, and Chrome on my Mac. They’re … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)