Skip to content

Instantly share code, notes, and snippets.

@ItsOnlyBinary
ItsOnlyBinary / plugin-custom-whois.html
Last active February 11, 2024 00:04
plugin-custom-whois.html
<template id="custom-whois">
<div>
<span class="kiwi-userbox-whois-line">
{{ user.away ?
$t('whois_status') + ': ' + user.away :
$t('whois_status_available')
}}
</span>
<span v-if="user.account" class="kiwi-userbox-whois-line">
{{ $t('user_account', {user: user.account}) }}
<style>
@media screen and (max-width: 769px) {
.kiwi-header-name-container {
max-width: 8%;
min-width: 30px;
}
.kiwi-header-option a {
padding: 0 8px;
min-width: 32px;
<style>
.kiwi-workspace-background {
background-image: url("/static/img/chat-background-light.png");
background-repeat: repeat;
opacity: 0.08;
}
.kiwi-wrap[data-theme="dark"] .kiwi-workspace-background,
.kiwi-wrap[data-theme="nightswatch"] .kiwi-workspace-background,
.kiwi-wrap[data-theme="radioactive"] .kiwi-workspace-background,
@ItsOnlyBinary
ItsOnlyBinary / plugin-embed-restrict.html
Created October 18, 2023 19:54
plugin-embed-restrict.html
<template id="embed-restrict">
<div class="embed-restrict">
{{ message }}
</div>
</template>
<script>
kiwi.plugin('embed-restrict', function(kiwi, log) {
if (window === window.top) {
return;
@ItsOnlyBinary
ItsOnlyBinary / plugin-sidebar-left.html
Created October 12, 2023 18:33
plugin-sidebar-left.html
<style>
.kiwi-statebrowser {
left: initial;
right: 0;
}
.kiwi-workspace {
margin-left: initial;
margin-right: 220px;
}
<style>
.kiwi-wrap .kiwi-workspace-background {
background-image: url('static/img/background.png');
background-position: center;
z-index: 0;
}
</style>
<template id="example-template">
<div @click="doClick">example plugin</div>
</template>
<script>
const componentObject = {
template: '#example-template',
props: [
'network',
'buffer',
@ItsOnlyBinary
ItsOnlyBinary / ircfw-middleware.js
Created December 11, 2022 15:03
Example of using irc-fw middleware to intercept and modify outgoing who messages
const IRC = require('irc-framework');
const debugRaw = true;
const debugEvents = false;
// Catch uncaught exceptions so the bot does not crash
process.on('uncaughtException', function (err) {
console.error(err.stack);
});
<template id="test-template">
<div>
<span>test-template</span>
<span>{{content}}</span>
</div>
</template>
<script>
kiwi.plugin('test-body-template', function (kiwi, log) {
const testTemplate = {
@ItsOnlyBinary
ItsOnlyBinary / kiwiirc-plugin-robohash.js
Last active July 24, 2022 13:59
kiwiirc-plugin-robohash.js
kiwi.plugin('robohash', (kiwi) => {
const avatarUrl = 'https://robohash.org/%NICK%.png?set=set1&size=%SIZE%';
kiwi.on('irc.join', (event, net) => {
kiwi.Vue.nextTick(() => {
updateAvatar(net, event.nick, false);
});
});
kiwi.on('irc.wholist', (event, net) => {