This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // needs https://github.com/liddiard/preview-gif | |
| const GifAnimationHandler = function({timeoutInSec = 5000} = {}) { | |
| const self = this; | |
| const allImgs = document.querySelectorAll("img"); | |
| self.deactivateAnimatedGifs = (gifNodeList) => { | |
| gifNodeList.forEach(gif => { | |
| PreviewGIF(gif.dataset.src, (err, imageData) => { | |
| if (err) console.error(err); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var css = document.createElement('style'); | |
| css.type = 'text/css'; | |
| var styles = 'a:focus {background: blue}'; | |
| if (css.styleSheet) css.styleSheet.cssText = styles; | |
| else css.appendChild(document.createTextNode(styles)); | |
| document.getElementsByTagName("head")[0].appendChild(css); |
OlderNewer