Posts

Sort table of links with Tablesorter jQuery plugin

Assuming you have a table of links (link a portal) in your website like the following: <table class="tablesorter" id="tbl1"> <thead> <tr> <th> Faculty </th> </tr> </thead> <tbody> <tr> <td><a href="#link1">A link</a></td> </tr> <tr> <td><a href="#link2">G Link</a></td> </tr> <tr> <td><a href="#link3">H Link</a></td> </tr> <tr> <td><a href="#link4">B Link</a></td> </tr> <tr> <td><a href="#link5">K Link</a></td> </tr> <tr> <td><a href="#link6">U Link</a></td> </tr> <tr> <td><a href="#link7">C Link</a></td> </tr...

Change Atom's title bar text using custom-title plugin

Image
To modify the Atom's title bar text with your own pattern, you can use this plugin: custom-title In Atom, go to Settings >> Install >> type custom-title in the search bar and install the package. After you have installed custom-title successfully, go to Settings >> Packages >> click custom-title's Settings button and change the title pattern to whatever you want using its provided syntax. For example, I want the title bar display full file's path, I will use this following template: <%= filePath %>

Change the scroll-top behavior of the ckeditor of MindTouch Core 10.1.3

I added a fixed top navigation bar to the theme of my MindTouch Core instance and it overlays the toolbar of the ckeditor when I scroll (because both of them are supposed to be at the top when scrolling). I have to fixed that by hacking into the core javascript of MindTouch for ckeditor: 1. First, we need to beautify the following file (because it was minified): Copy content of mindtouch.js   /path/to/dekiwiki/deki/plugins/page_editor_ckeditor/ckeditor/mindtouch.js Go to  http://jsbeautifier.org/  and beautify the javascript, copy it. Replace the minified content with the beautify one into mindtouch.js 2. Next, go to line 737 and change as following:                 if (g < l) {                         // this will                          j = g - i + 55;         ...

Remove the ending character (delimiter) of the breadcrumb in MindTouch Core 10.1.3

To remove the ending character (the delimiter, " > ") of the breadcrumb in MindTouch Core (v10.1.3), you can do the following: 1. Open this file /path/to/dekiwiki/includes/Skin.php: $ nano /path/to/dekiwiki/includes/Skin.php 2. Go to line 168 and remove the special character output (in red color):         function getHierarchy() {                 $parents = $this->getParents();                 $rootNode = count($parents) == 1;                                  //special case; when you're on the home page, let's add an extra delimiter at the end, so it doesn't look like freestanding text                 if ($rootNode) {                         $parents[] = '';         ...

Adjust the width of the side panel of MindTouch Core 10.1.3

If you want to adjust the width of the side panel of MindTouch Core (v10.1.3), you need to do a little hack: 1. Open this file /path/to/dekiwiki/deki/plugins/nav_pane/nav_pane.php: $ nano   /path/to/dekiwiki/deki/plugins/nav_pane/ nav_pane.php 2. Go to line 66, change the number (in red color) to whatever you like: ...         $width = isset($wgNavPaneWidth) ? $wgNavPaneWidth : 2600 ; ... Neat!

Check if an element is shown with jQuery

Quite easy: jQuery('#some-element-id').is(':visible'); Cool!

Ex Machina drawing

Image
here