Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaosmeister authored Dec 6, 2021
1 parent b4b2dae commit b52762e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RCB/Assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pre {
resize:both
}
9 changes: 9 additions & 0 deletions RCB/Assets/js/function.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KB.on('dom.ready', function() {
var list = [...document.getElementsByTagName("pre")]

for (let item of list) {
if (item.scrollHeight > 200) {
item.style.height = "200px"
}
}
});
39 changes: 39 additions & 0 deletions RCB/Plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace Kanboard\Plugin\RCB;

use Kanboard\Core\Plugin\Base;

class Plugin extends Base
{
public function initialize()
{
$this->hook->on('template:layout:css', array('template' => 'plugins/RCB/Assets/css/style.css'));
$this->hook->on('template:layout:js', array('template' => 'plugins/RCB/Assets/js/function.js'));
}

public function getPluginName()
{
return 'Resizable codeblocks';
}

public function getPluginDescription()
{
return 'Make codeblocks resizable, scrollable and limit their initial height to 200 pixels';
}

public function getPluginAuthor()
{
return 'Tomas Dittmann';
}

public function getPluginVersion()
{
return '1.0.0';
}

public function getPluginHomepage()
{
return "https://github.com/Chaosmeister/RCB";
}
}

0 comments on commit b52762e

Please sign in to comment.