Permalink
Browse files

now skipping user's stories in the list. assuming you'd want to keep …

…track of these :)
  • Loading branch information...
1 parent 050d27b commit c934d74c5f7cd7185ece05c9a5f9cc0bb3cb3d31 @dnewcome committed Feb 8, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 hn.user.js
View
@@ -82,6 +82,10 @@ function killstories() {
var kill = ( localStorage.getItem( 'kill' ) || '' ).split( ' ' );
var plonk = ( localStorage.getItem( 'plonk' ) || '' ).split( ' ' );
+ if( isMyStory( killrow ) ) {
+ continue;
+ }
+
// voted or 'sponsored' story.
if( !id ) {
console.log( 'removing item without voting link' );
@@ -248,6 +252,17 @@ function getStoryId( el ) {
return null;
}
}
+/**
+ * Test to see if this story was submitted by logged-in user
+ */
+function isMyStory( el ) {
+ if( el.getElementsByTagName( 'font' ).length > 0 && el.getElementsByTagName( 'font' )[0].innerHTML == "*" ) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
function getStoryTitle( el ) {
return el.getElementsByTagName( 'a' )[1].innerHTML;
}

0 comments on commit c934d74

Please sign in to comment.