-
29 ОКТ 20160
-
18 ОКТ 20160
mFancyTitle - jquery плагин для анимации favicon и title
Пример использования$.mFancyTitle({ mftMissYou: true, mftMissYouTitle: 'Hey! I miss you!', // new document title: it will appear when the user leaves your page and open another tab in the browser mftMissYouFavicon: { 'apple-touch-icon-precomposed': 'path-to/apple-touch-icon-152x152.png', 'icon': 'path-to/favicon-32x32.png', 'shortcut icon': 'path-to/favicon.ico' } // new favicons: they will be visible when the user leaves your page and open another tab in the browser });
http://mft.musings.it/ -
17 ОКТ 20160
abDetector - детектор адблока на чистом js
window.onload = function() { var iframe = document.createElement('iframe'), randomNum = Math.floor(Math.random() * (10000 - 123 + 1)) + 123, protocol = window.location.protocol; iframe.src = protocol +"//google.com/"+ randomNum +"/ads.html"; iframe.height = ".1px"; iframe.width = ".1px"; iframe.id = 'some-ad'; getRequest(iframe, function (response) { // On Success document.body.appendChild(iframe); }, function (xhr, status) { // On error if (status === 0) // Request aborted document.body.appendChild(iframe); }); setTimeout(function() { var someAd = document.getElementById('some-ad'); if(someAd === null || someAd.style.display == "none" || someAd.style.display == "hidden" || someAd.style.visibility == "hidden" || someAd.offsetHeight === 0) document.getElementById('ab-message').style.display = 'block'; else someAd.remove(); }, 500); }; function getRequest (iframe, success, error) { var xhr = XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); xhr.open("GET", iframe.src); xhr.onreadystatechange = function(){ if (xhr.readyState == 4) if (xhr.status == 200) // Loaded successfully success(xhr.responseText); else // For any other error error(xhr, xhr.status); }; xhr.send(); }
https://github.com/R4meau/abDetector -
03 ОКТ 20160
-
29 СЕНТ 20160
-
27 СЕНТ 20160
-
22 СЕНТ 20160
Granim.js - скрипт создания градиентной анимации
<!-- Create a <canvas> element --> <canvas id="granim-canvas"></canvas> <!-- Call the script --> <script src="granim.min.js"></script> <!-- Create a Granim instance --> <script> var granimInstance = new Granim({ element: '#granim-canvas', name: 'granim', opacity: [1, 1], states : { "default-state": { gradients: [ ['#834D9B', '#D04ED6'], ['#1CD8D2', '#93EDC7'] ] } } }); </script>
https://github.com/sarcadass/granim.js -
21 СЕНТ 20160
Категории:
Оставить на заметку в: