Skip to content

Instantly share code, notes, and snippets.

@ItsOnlyBinary
Last active February 18, 2022 16:15
Show Gist options
  • Save ItsOnlyBinary/150c83940da032e83a6eb82f021d319e to your computer and use it in GitHub Desktop.
Save ItsOnlyBinary/150c83940da032e83a6eb82f021d319e to your computer and use it in GitHub Desktop.
<template id="userbox_button">
<div class="kiwi-userbox-action">
<a @click="buttonClicked($event)">
<i class="fa fa-warning" aria-hidden="true"></i>
{{ title }}
</a>
</div>
</template>
<script>
kiwi.plugin('test_userbox_button', function(kiwi, log) {
var userboxButton = kiwi.Vue.extend({
template: '#userbox_button',
data: function data() {
return {
title: '',
};
},
methods: {
buttonClicked: function buttonClicked(event) {
let nick = this.$el.kiwi.userbox.user.nick;
window.open('https://www.chaat.fr/profil/' + nick, '_blank').focus();
},
},
});
var b1 = new userboxButton({data: {title: 'View Profile'}});
b1.$mount();
kiwi.addUi('userbox_button', b1.$el);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment