-
-
Save bleuarg/fe24ab2b0756c4a01f7f3c7bc41a65d2 to your computer and use it in GitHub Desktop.
Revisions
-
kristopolous revised this gist
Aug 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ function query() { // Traverses up the dom stack trying to find a match of a specific class function up_to(node, klass) { if (node.classList.contains(klass)) { return node; } if(node === document.body) { -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function query() { query = destring(query); job_list.forEach(function(node) { if(node.innerHTML.search(query) > -1) { display(node, 'block'); shown ++; } -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function query() { toTest = node.innerHTML; and_query_list.forEach(function(query) { doesMatch &= toTest.search(query) > -1; }) if(doesMatch) { -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ function query() { var // HN is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments), shown = 0, total = job_list.length; // Traverses up the dom stack trying to find a match of a specific class function up_to(node, klass) { @@ -29,7 +29,6 @@ function query() { // Hide all the postings job_list.forEach(function(node) { display(node, 'none'); }); query_list.forEach(function(query) { -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ function query() { var shown = 0, total = 0, // HN is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ function query() { job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); // Traverses up the dom stack trying to find a match of a specific class function up_to(node, klass) { if (node.className === klass) { return node; @@ -20,11 +20,13 @@ function query() { up_to(node, 'athing').style.display = what; } // If we have a RegEx, return it // Otherwise make it a case insensitive regex. function destring(what) { return what.test ? what : new RegExp(what.toString(), 'i'); } // Hide all the postings job_list.forEach(function(node) { display(node, 'none'); total ++; @@ -60,5 +62,6 @@ function query() { }); } }); return {shown: shown, total: total} } -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,10 @@ function query() { up_to(node, 'athing').style.display = what; } function destring(what) { return what.test ? what : new RegExp(what.toString(), 'i'); } // Turn them all off job_list.forEach(function(node) { display(node, 'none'); @@ -28,9 +32,7 @@ function query() { query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(destring); job_list.forEach(function(node) { var @@ -48,7 +50,7 @@ function query() { }); } else { query = destring(query); job_list.forEach(function(node) { if(node.innerHTML.search(query) !== -1) { -
kristopolous revised this gist
Mar 1, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function query() { query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { return what.test ? what : new RegExp(what.toString(), 'i'); }); job_list.forEach(function(node) { @@ -48,7 +48,7 @@ function query() { }); } else { query = query.test ? query : new RegExp(query.toString(), 'i'); job_list.forEach(function(node) { if(node.innerHTML.search(query) !== -1) { -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,7 +51,7 @@ function query() { query = new RegExp(query.toString(), 'i'); job_list.forEach(function(node) { if(node.innerHTML.search(query) !== -1) { display(node, 'block'); shown ++; } -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,13 +19,13 @@ function query() { function display(node, what) { up_to(node, 'athing').style.display = what; } // Turn them all off job_list.forEach(function(node) { display(node, 'none'); total ++; }); query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { @@ -35,7 +35,7 @@ function query() { job_list.forEach(function(node) { var doesMatch = true, toTest = node.innerHTML; and_query_list.forEach(function(query) { doesMatch &= (toTest.search(query) > -1); -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,13 +16,13 @@ function query() { return up_to(node.parentNode, klass); } function display(node, what) { up_to(node, 'athing').style.display = what; } // Turn them all off job_list.forEach(function(node) { display(node, 'none'); total ++; }); @@ -42,7 +42,7 @@ function query() { }) if(doesMatch) { display(node, 'block'); shown ++; } }); @@ -52,7 +52,7 @@ function query() { job_list.forEach(function(node) { if(node.innerHTML.toLowerCase().search(query) !== -1) { display(node, 'block'); shown ++; } }); -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,18 +6,18 @@ function query() { query_list = Array.prototype.slice.call(arguments); // This traverses up the dom stack trying to find a match of a specific class function up_to(node, klass) { if (node.className === klass) { return node; } if(node === document.body) { throw new Exception(); } return up_to(node.parentNode, klass); } function style(node, what) { up_to(node, 'athing').style.display = what; } // Turn them all off -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function query() { query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { return new RegExp(what.toString(), 'i'); }); job_list.forEach(function(node) { @@ -48,7 +48,7 @@ function query() { }); } else { query = new RegExp(query.toString(), 'i'); job_list.forEach(function(node) { if(node.innerHTML.toLowerCase().search(query) !== -1) { @@ -59,4 +59,4 @@ function query() { } }); return {shown: shown, total: total} } -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function query() { query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { return what.toLowerCase ? what.toLowerCase() : what; }); job_list.forEach(function(node) { @@ -48,7 +48,7 @@ function query() { }); } else { query = query.toLowerCase ? query.toLowerCase() : query; job_list.forEach(function(node) { if(node.innerHTML.toLowerCase().search(query) !== -1) { -
kristopolous revised this gist
Sep 2, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ function query() { var total = 0, shown = 0, // HN is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); // This traverses up the dom stack trying to find a match of a specific class -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ function query() { var total = 0, shown = 0, // HN is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.c00,.c9c,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); // This traverses up the dom stack trying to find a match of a specific class -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,9 +36,11 @@ function query() { var doesMatch = true, toTest = node.innerHTML.toLowerCase(); and_query_list.forEach(function(query) { doesMatch &= (toTest.search(query) > -1); }) if(doesMatch) { style(node, 'block'); shown ++; -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,10 @@ function query() { var total = 0, shown = 0, // HN is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.c00,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); // This traverses up the dom stack trying to find a match of a specific class function upTo(node, klass) { if (node.className === klass) { @@ -13,13 +19,6 @@ function query() { function style(node, what) { upTo(node, 'athing').style.display = what; } // Turn them all off job_list.forEach(function(node) { -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 15 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,17 +8,22 @@ function query() { throw new Exception(); } return upTo(node.parentNode, klass); } function style(node, what) { upTo(node, 'athing').style.display = what; } var total = 0, shown = 0, // hn is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.c00,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); // Turn them all off job_list.forEach(function(node) { style(node, 'none'); total ++; }); @@ -29,25 +34,28 @@ function query() { }); job_list.forEach(function(node) { var doesMatch = true, toTest = node.innerHTML.toLowerCase(); and_query_list.forEach(function(query) { doesMatch &= (toTest.search(query) > -1); }) if(doesMatch) { style(node, 'block'); shown ++; } }); } else { query = query.toLowerCase(); job_list.forEach(function(node) { if(node.innerHTML.toLowerCase().search(query) !== -1) { style(node, 'block'); shown ++; } }); } }); return {shown: shown, total: total} } -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ function query() { // This traverses up the dom stack trying to find a match of a specific class function upTo(node, klass) { if (node.className === klass) { return node; } if(node === document.body) { throw new Exception(); } return upTo(node.parentNode, klass); } @@ -25,7 +25,7 @@ function query() { query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { return what.toLowerCase(); }); job_list.forEach(function(node) { -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 20 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,40 @@ function query() { // This traverses up the dom stack trying to find a match of a specific class function upTo(node, klass) { if (node.className === klass) { return node; } if(node === document.body) { throw new Exception(); } return upTo(node.parentNode, klass); } var total = 0, shown = 0, // hn is done with very unsemantic classes. job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.c00,.cdd,.c73,.c88')), query_list = Array.prototype.slice.call(arguments); // turn them all off job_list.forEach(function(node) { upTo(node, 'athing').style.display = 'none'; total ++; }); query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { return what.toLowerCase(); }); job_list.forEach(function(node) { var doesMatch = true, toTest = node.innerHTML.toLowerCase(); and_query_list.forEach(function(query) { doesMatch &= (toTest.search(query) > -1); }) if(doesMatch) { upTo(node, 'athing').style.display = 'block'; shown ++; } }); @@ -29,11 +43,11 @@ function query() { query = query.toLowerCase(); job_list.forEach(function(node) { if(node.innerHTML.toLowerCase().search(query) !== -1) { upTo(node, 'athing').style.display = 'block'; shown ++; } }); } }); return {shown: shown, total: total} } -
kristopolous revised this gist
Sep 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ function query() { var total = 0, shown = 0, job_list = Array.prototype.slice.call(document.querySelectorAll('.c00,.cdd,.c88')), query_list = Array.prototype.slice.call(arguments); // turn them all off -
kristopolous revised this gist
Aug 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ function query() { var total = 0, shown = 0, job_list = Array.prototype.slice.call(document.querySelectorAll('.c00,.cdd')), query_list = Array.prototype.slice.call(arguments); // turn them all off -
kristopolous renamed this gist
Aug 4, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
kristopolous created this gist
Aug 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ function query() { var total = 0, shown = 0, job_list = Array.prototype.slice.call(document.querySelectorAll('.c00')), query_list = Array.prototype.slice.call(arguments); // turn them all off job_list.forEach(function(node) { node.parentNode.parentNode.parentNode.style.display = 'none'; total ++; }); query_list.forEach(function(query) { if (query.forEach) { var and_query_list = query.map(function(what) { return what.toLowerCase(); }); job_list.forEach(function(node) { var doesMatch = true, toTest = node.innerHTML.toLowerCase(); and_query_list.forEach(function(query) { doesMatch &= (toTest.search(query) > -1); }) if(doesMatch) { node.parentNode.parentNode.parentNode.style.display = 'block'; shown ++; } }); } else { query = query.toLowerCase(); job_list.forEach(function(node) { if(node.innerHTML.toLowerCase().search(query) !== -1) { node.parentNode.parentNode.parentNode.style.display = 'block'; shown ++; } }); } }); return {shown: shown, total: total} }