UNPKG

vue-if-bot

Version:

Hide stuff from bots (especially cookie consents)

3 lines (2 loc) 515 B
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ifBot=t()}(this,function(){"use strict";return{functional:!0,render:function(e,t){t.children;var r=t.slots,n=t.props,o=n.regex,i=n.invert,f=e("div",{},[]);if(process.server)return f;var s=o||/bot|googlebot|crawler|spider|robot|crawling/i,u=navigator.userAgent&&s.test(navigator.userAgent);return(i?u:!u)?e("div",{},r().default):f}}}); //# sourceMappingURL=vue-if-bot.min.js.map