Background color not showing in print preview

The Chrome CSS property -webkit-print-color-adjust: exact; works appropriately. However, making sure you have the correct CSS for printing can often be tricky. Several things can be done to avoid the difficulties you are having. First, separate all your print CSS from your screen CSS. This is done via the @media print and @media screen. Often … Read more

How can I debug javascript on Android?

Update: Remote Debugging Previously, console logging was the best option for debugging JavaScript on Android. These days with Chrome for Android remote debugging, we are able to make use of all the goodness of the Chrome for Desktop Developer Tools on Android. Check out https://developers.google.com/chrome-developer-tools/docs/remote-debugging for more information. Update: JavaScript Console You can also navigate … Read more

Convert Data URI to File then append to FormData

After playing around with a few things, I managed to figure this out myself. First of all, this will convert a dataURI to a Blob: function dataURItoBlob(dataURI) { // convert base64/URLEncoded data component to raw binary data held in a string var byteString; if (dataURI.split(‘,’)[0].indexOf(‘base64’) >= 0) byteString = atob(dataURI.split(‘,’)[1]); else byteString = unescape(dataURI.split(‘,’)[1]); // … Read more

Custom CSS Scrollbar for Firefox

As of late 2018, there is now limited customization available in Firefox! See these answers: https://stackoverflow.com/a/54101063/405015 https://stackoverflow.com/a/53739309/405015 And this for background info: https://bugzilla.mozilla.org/show_bug.cgi?id=1460109 There’s no Firefox equivalent to ::-webkit-scrollbar and friends. You’ll have to stick with JavaScript. Plenty of people would like this feature, see: https://bugzilla.mozilla.org/show_bug.cgi?id=77790 As far as JavaScript replacements go, you can try: … Read more

Javascript / Chrome – How to copy an object from the webkit inspector as code

Right-click an object in Chrome’s console and select Store as Global Variable from the context menu. It will return something like temp1 as the variable name. Chrome also has a copy() method, so copy(temp1) in the console should copy that object to your clipboard. Note on Recursive Objects: If you’re trying to copy a recursive … Read more

CSS transition shorthand with multiple properties?

Syntax: transition: <property> || <duration> || <timing-function> || <delay> [, …]; Note that the duration must come before the delay, if the latter is specified. Individual transitions combined in shorthand declarations: -webkit-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s; -moz-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s; -o-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s; … Read more

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