Updated stopwords plugin for v1.3
parent
95484f1713
commit
1e82e69c33
1 changed files with 4 additions and 4 deletions
|
@ -37,8 +37,8 @@ document.getElementById('post-'+post_id).status;
|
||||||
``` js
|
``` js
|
||||||
// hide posts with stopwords
|
// hide posts with stopwords
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if(bungloo_instance.action == 'timeline') {
|
if(bungloo.timeline) {
|
||||||
bungloo_instance.body.addEventListener( 'DOMNodeInserted', filter, false );
|
bungloo.timeline.body.addEventListener( 'DOMNodeInserted', filter, false );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ function filter(e) {
|
||||||
];
|
];
|
||||||
var element = e.target;
|
var element = e.target;
|
||||||
var parent = element.parentNode;
|
var parent = element.parentNode;
|
||||||
if(parent != bungloo_instance.body) return;
|
if(parent != bungloo.timeline.body) return;
|
||||||
var text = element.innerHTML;
|
var text = element.innerHTML;
|
||||||
for(var i=0, count=stopwords.length; i<count; ++i) {
|
for(var i=0, count=stopwords.length; i<count; ++i) {
|
||||||
if(text.indexOf(stopwords[i]) > -1) {
|
if(text.indexOf(stopwords[i]) > -1) {
|
||||||
|
@ -117,7 +117,7 @@ ol li:hover .message a.name {
|
||||||
<h2 id="tmp-conv"><a href="#tmp-conv">Add converted temperature</a></h2>
|
<h2 id="tmp-conv"><a href="#tmp-conv">Add converted temperature</a></h2>
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
// A Bungloo plugin to automatically convert fahrenheit to celcius
|
// A Bungloo plugin to automatically convert Fahrenheit to Celsius
|
||||||
// and vice versa. Change the unit in the line: var unit = "F";
|
// and vice versa. Change the unit in the line: var unit = "F";
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
Reference in a new issue