1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-11-27 22:48:53 +02:00
Files
imgproxy/docs/assets/docsify-pro-badge.js
2022-06-29 20:03:19 +06:00

20 lines
507 B
JavaScript

; (function (win) {
win.ProBadgePlugin = {}
function create() {
var regex = /\!\[pro\]\((\S+)\)/g;
var proLink = '<a class="badge" href="https://imgproxy.net/#pro" target="_blank">' +
'<img src="$1" title="This feature is available in imgproxy Pro"/>' +
'</a>';
return function (hook) {
hook.beforeEach(function (content, next) {
content = content.replaceAll(regex, proLink)
next(content)
})
}
}
win.ProBadgePlugin.create = create
})(window)