Changed name from Tentia to Bungloo
parent
7b89c2f80b
commit
f9c9ecbbe2
1 changed files with 11 additions and 11 deletions
22
Plugins.md
22
Plugins.md
|
@ -1,12 +1,12 @@
|
|||
This are example plugins to get you started. Save the code in a file `~/Library/Application Support/Tentia/Plugin.js`. You have to create this directory yourself.
|
||||
This are example plugins to get you started. Save the code in a file `~/Library/Application Support/Bungloo/Plugin.js`. You have to create this directory yourself.
|
||||
|
||||
You can add CSS too, create the file `~/Library/Application Support/Tentia/Plugin.css` where you can put your personal CSS.
|
||||
You can add CSS too, create the file `~/Library/Application Support/Bungloo/Plugin.css` where you can put your personal CSS.
|
||||
|
||||
Since OS X 10.7 Lion, the `~/Library/` folder is hidden by default. If you want to save your own CSS file, open the Finder and choose `Go` → `Go to folder…` and enter `~/Library/Application Support/`, there you can create the Folder `Tentia`, if it doesn't exist and copy the plugin file there. You can also open the Library folder by choosing the `Library` menu item that appear in the `Go` menu while pressing the Option `⌥` key.
|
||||
Since OS X 10.7 Lion, the `~/Library/` folder is hidden by default. If you want to save your own CSS file, open the Finder and choose `Go` → `Go to folder…` and enter `~/Library/Application Support/`, there you can create the Folder `Bungloo`, if it doesn't exist and copy the plugin file there. You can also open the Library folder by choosing the `Library` menu item that appear in the `Go` menu while pressing the Option `⌥` key.
|
||||
|
||||
An alternative is to make the `~/Library` folder visible. To do this, open the Terminal and type in `chflags nohidden ~/Library/`. This will show the Library folder in the finder. If you want to remove the folder from the finder, you have to open the Terminal again and type in `chflags hidden ~/Library/` and the folder is gone.
|
||||
|
||||
To ease plugins development you can enable WebKit inspector for Tent windows using executing this command in a Terminal window: `defaults write nu.jabs.apps.tentia WebKitDeveloperExtras -bool YES`.
|
||||
To ease plugins development you can enable WebKit inspector for Tent windows using executing this command in a Terminal window: `defaults write nu.jabs.apps.bungloo WebKitDeveloperExtras -bool YES`.
|
||||
To open the inspector, right click on the view and choose `Inspect Element` from the contextual menu.
|
||||
|
||||
You can use the embeded jQuery too.
|
||||
|
@ -19,8 +19,8 @@ You can use the embeded jQuery too.
|
|||
``` js
|
||||
// hide posts with stopwords
|
||||
$(document).ready(function() {
|
||||
if(tentia_instance.action == 'timeline') {
|
||||
tentia_instance.body.addEventListener( 'DOMNodeInserted', filter, false );
|
||||
if(bungloo_instance.action == 'timeline') {
|
||||
bungloo_instance.body.addEventListener( 'DOMNodeInserted', filter, false );
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -32,7 +32,7 @@ function filter(e) {
|
|||
];
|
||||
var element = e.target;
|
||||
var parent = element.parentNode;
|
||||
if(parent != tentia_instance.body) return;
|
||||
if(parent != bungloo_instance.body) return;
|
||||
var text = element.innerHTML;
|
||||
for(var i=0, count=stopwords.length; i<count; ++i) {
|
||||
if(text.indexOf(stopwords[i]) > -1) {
|
||||
|
@ -86,12 +86,12 @@ ol li .message {
|
|||
<h2 id="tmp-conv"><a href="#tmp-conv">Add converted temperature</a></h2>
|
||||
|
||||
``` javascript
|
||||
// A Tentia plugin to automatically convert fahrenheit to celcius
|
||||
// A Bungloo plugin to automatically convert fahrenheit to celcius
|
||||
// and vice versa. Change the unit in the line: var unit = "F";
|
||||
|
||||
$(document).ready(function() {
|
||||
if(tentia_instance && tentia_instance.body) {
|
||||
tentia_instance.body.addEventListener(
|
||||
if(bungloo_instance && bungloo_instance.body) {
|
||||
bungloo_instance.body.addEventListener(
|
||||
'DOMNodeInserted',
|
||||
tmpConv,
|
||||
false
|
||||
|
@ -104,7 +104,7 @@ function tmpConv(e) {
|
|||
var unit = "F"; // either F or C, the one you want to convert
|
||||
|
||||
var element = e.target;
|
||||
if(element.parentNode != tentia_instance.body) return;
|
||||
if(element.parentNode != bungloo_instance.body) return;
|
||||
|
||||
var message = $(element).find(".message");
|
||||
|
||||
|
|
Reference in a new issue