favicon-marquee
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FaviconMarquee=e():t.FaviconMarquee=e()}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}i.r(e);var o=function(){function t(e){var i,n,o,r,s,a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.size=null!==(i=e.size)&&void 0!==i?i:32,this.text=null!==(n=e.text)&&void 0!==n?n:"SCROLLING TEXT",this.color=null!==(o=e.color)&&void 0!==o?o:"green",this.step=null!==(r=e.step)&&void 0!==r?r:.5,this.font=null!==(s=e.font)&&void 0!==s?s:"Arial, sans-serif",this.marginBottom=null!==(a=e.marginBottom)&&void 0!==a?a:0,this.background=e.background,this.pixelsScrolled=0}var e,i,o;return e=t,(i=[{key:"start",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3/24;this.favicon=document.createElement("link"),this.favicon.type="image/jpeg",this.favicon.rel="shortcut icon",document.head.appendChild(this.favicon),setInterval((function(){return t.draw()}),e)}},{key:"createCanvas",value:function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.size,this.canvas.height=this.size,this.canvas.hidden=!0,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.size+"px "+this.font,this.textWidth=Math.ceil(this.ctx.measureText(this.text).width)}},{key:"draw",value:function(){this.createCanvas(),this.background?(this.ctx.fillStyle=this.background,this.ctx.rect(0,0,this.size,this.size),this.ctx.fill()):this.ctx.clearRect(0,0,this.size,this.size),this.pixelsScrolled+=this.step,this.pixelsScrolled>this.textWidth+2*this.size&&(this.pixelsScrolled=0);var t=-1*this.pixelsScrolled+this.size;this.ctx.fillStyle=this.color,this.ctx.fillText(this.text,t,this.size-this.marginBottom),this.favicon.href=this.canvas.toDataURL("image/png",.3)}}])&&n(e.prototype,i),o&&n(e,o),t}();e.default=o}]).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FaviconMarquee=e():t.FaviconMarquee=e()}(self,(function(){return function(){"use strict";var t={};function e(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var i=function(){function t(e){var i,s,n,o,a,c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.size=null!==(i=e.size)&&void 0!==i?i:32,this.text=null!==(s=e.text)&&void 0!==s?s:"SCROLLING TEXT",this.color=null!==(n=e.color)&&void 0!==n?n:"green",this.step=null!==(o=e.step)&&void 0!==o?o:.5,this.font=null!==(a=e.font)&&void 0!==a?a:"Arial, sans-serif",this.marginBottom=null!==(c=e.marginBottom)&&void 0!==c?c:0,this.background=e.background,this.pixelsScrolled=0}var i,s;return i=t,(s=[{key:"start",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3/24;this.favicon=document.createElement("link"),this.favicon.type="image/jpeg",this.favicon.rel="shortcut icon",document.head.appendChild(this.favicon),this.createCanvas(),setInterval((function(){return t.draw()}),e)}},{key:"createCanvas",value:function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.size,this.canvas.height=this.size,this.canvas.hidden=!0,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.size+"px "+this.font,this.textWidth=Math.ceil(this.ctx.measureText(this.text).width)}},{key:"draw",value:function(){this.background?(this.ctx.fillStyle=this.background,this.ctx.rect(0,0,this.size,this.size),this.ctx.fill()):this.ctx.clearRect(0,0,this.size,this.size),this.pixelsScrolled+=this.step,this.pixelsScrolled>this.textWidth+2*this.size&&(this.pixelsScrolled=0);var t=-1*this.pixelsScrolled+this.size;this.ctx.fillStyle=this.color,this.ctx.fillText(this.text,t,this.size-this.marginBottom),this.favicon.href=this.canvas.toDataURL("image/png",.3)}}])&&e(i.prototype,s),t}();return t.default=i,t.default}()})); |
{ | ||
"name": "favicon-marquee", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "An animated scrolling favicon for your website", | ||
@@ -29,4 +29,4 @@ "main": "lib/main.js", | ||
"prettier": "2.1.2", | ||
"webpack": "^4.44.2", | ||
"webpack-cli": "^3.3.12" | ||
"webpack": "^5.31.0", | ||
"webpack-cli": "^4.6.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "browserslist": [ |
@@ -0,0 +0,0 @@ # favicon-marquee |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7538