代码拉取完成,页面将自动刷新
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.watermark=e():t.watermark=e()}(self,function(){"use strict";var t={};function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o,n=arguments[e];for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function o(t){if((o=t).w_texts&&"[object Array]"!==Object.prototype.toString.call(o.w_texts)?(alert("水印文字参数必须是数组类型"),!1):!!o.w_texts.length||(alert("水印文字数组的长度必须大于0"),!1)){for(var e={},e=t.w_options&&"[object Object]"===Object.prototype.toString.call(t.w_options)?c({},d,t.w_options):c({},d),o="3.14159261111",n=(null!==document.getElementById(o)&&document.body.removeChild(document.getElementById(o)),document.createElement("canvas")),l=(n.width=e.width,n.height=e.height,n.getContext("2d")),i=(l.rotate(-(e.rotateDeg*Math.PI)/180),l.font=e.fontSize+"px "+e.fontFamily,l.fillStyle=e.color,l.textAlign=e.textAlign,t.w_texts),r=0;r<i.length;r++){var a=i[r]||" ";l.fillText(a,n.width/16,n.height/2+r*e.fontSize)}t=document.createElement("div");return t.id=o,t.style.width=document.documentElement.clientWidth-10+"px",t.style.height=document.documentElement.clientHeight-20+"px",t.style.pointerEvents="none",t.style.position="fixed",t.style.top=e.top,t.style.left=e.left,t.style.opacity=e.opacity,t.style.background="url("+n.toDataURL()+") left top repeat",t.style.zIndex=e.zIndex,document.body.appendChild(t),o}}var e={},d={width:200,height:100,top:"0px",left:"0px",fontSize:"16",fontFamily:"serif",fillStyle:"rgba(200, 200, 200, 0.8)",color:"#666",opacity:"0.8",textAlign:"left",rotateDeg:20,zIndex:999999};return e.setWatermark=function(t){var e=o(t);null===document.getElementById(e)&&o(t),window.onresize=function(){o(t)}},e.removeWatermark=function(){var t=document.getElementById("3.14159261111");null!==t&&document.body.removeChild(t)},t.default=e,t=t.default});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。