gh code highlighting on

noformnocontent 2012-11-29 02:19:31 -08:00
parent 8a10b99f41
commit 111af98d27

@ -9,13 +9,14 @@ To open the inspector, right click on the view and choose `Inspect Element` from
## Hide posts with stopwords plugin ## Hide posts with stopwords plugin
$(document).ready(function() { ``` js
$(document).ready(function() {
if(tentia_instance.action == "timeline") { if(tentia_instance.action == "timeline") {
tentia_instance.body.addEventListener( 'DOMNodeInserted', filter, false ); tentia_instance.body.addEventListener( 'DOMNodeInserted', filter, false );
} }
}); });
function filter(e) { function filter(e) {
var stopwords = [ var stopwords = [
// Add the stopwords here // Add the stopwords here
"apple", "apple",
@ -31,26 +32,30 @@ To open the inspector, right click on the view and choose `Inspect Element` from
return; return;
} }
} }
} }
```
You can use the embeded jQuery too, here for example a plugin which lets you mark particular posts so you don't forget them in your timeline: You can use the embeded jQuery too, here for example a plugin which lets you mark particular posts so you don't forget them in your timeline:
## Mark post plugin ## Mark post plugin
$("ol").delegate('a', 'click dblclick', function(e) { ``` js
$("ol").delegate('a', 'click dblclick', function(e) {
e.stopPropagation(); e.stopPropagation();
}).delegate('li', 'dblclick', function(e) { }).delegate('li', 'dblclick', function(e) {
var li = $(this); var li = $(this);
if(li.hasClass("selected")) { if(li.hasClass("selected")) {
li.removeClass("selected"); li.removeClass("selected");
} else { } else {
li.addClass("selected"); li.addClass("selected");
} }
}); });
```
And add this to your CSS plugin file. And add this to your CSS plugin file.
.selected { ``` css
.selected {
border-right: 5px solid green; border-right: 5px solid green;
} }
```