Skip to content

Instantly share code, notes, and snippets.

@mogsdad
Forked from WillSullivan/TaggedQuestionList.userscript
Last active February 27, 2018 21:06

Revisions

  1. mogsdad revised this gist Feb 27, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,13 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @namespace https://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.10
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?:\/\/(?:meta.)?(?:stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com(?:\/(\?|questions\/tagged|search).*)?$/
    // https://regex101.com/r/1D5jof/1
    // @include /^https?:\/\/(?:meta.)?(?:stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com(?:\/(?:\?|questions(?:$|\/tagged|\?)|search|unanswered).*)?$/
    // https://regex101.com/r/1D5jof/3
    // ==/UserScript==

    var runTagList = tagList();
  2. mogsdad revised this gist Feb 27, 2018. No changes.
  3. mogsdad revised this gist Feb 27, 2018. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@
    // ==/UserScript==

    var runTagList = tagList();
    var wannaReSort = false; // Set to true to sort closed items to top

    $(document).ajaxComplete(tagList);

    @@ -25,11 +26,13 @@ function tagList() {
    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();

    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().insertBefore($('.question-summary').first());
    });
    if (wannaReSort) {
    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().insertBefore($('.question-summary').first());
    });
    }

    // Bail out if we don't have 5+ posts. (reviews have 1 or 2, but 5 is a nice number)
    if( $(App.linkytarget).children().length <= 5 ) return;
  4. mogsdad revised this gist Feb 27, 2018. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -3,10 +3,11 @@
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.9
    // @version 1.2.10
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://\w*.?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/((questions/(new|popular|need-answers)|search).*)?/
    // @include /^https?:\/\/(?:meta.)?(?:stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com(?:\/(\?|questions\/tagged|search).*)?$/
    // https://regex101.com/r/1D5jof/1
    // ==/UserScript==

    var runTagList = tagList();
    @@ -16,11 +17,11 @@ $(document).ajaxComplete(tagList);
    function tagList() {
    // If list already present, quit.
    if ($('.linkylist').length) return;

    var App = {};

    userscriptCSS();

    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();

    @@ -54,7 +55,7 @@ function tagList() {
    return (text == 'open' ? 'close' : 'open');
    });
    });
    // note that when you click a link it gets removed from the list.
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    @@ -87,5 +88,5 @@ function tagList() {
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }
    }
    }
  5. mogsdad revised this gist May 6, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.8
    // @version 1.2.9
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://\w*.?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/((questions/(new|popular|need-answers)|search).*)?/
    @@ -27,7 +27,7 @@ function tagList() {
    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    App.items.closest('.question-summary').detach().insertBefore($('.question-summary').first());
    });

    // Bail out if we don't have 5+ posts. (reviews have 1 or 2, but 5 is a nice number)
    @@ -63,7 +63,7 @@ function tagList() {
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    App.listbody.append(App.parent);
    });

    /**
  6. mogsdad revised this gist Sep 28, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -30,8 +30,8 @@ function tagList() {
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });

    // Bail out if we don't have 2+ posts
    if( $(App.linkytarget).children().length <= 1 ) return;
    // Bail out if we don't have 5+ posts. (reviews have 1 or 2, but 5 is a nice number)
    if( $(App.linkytarget).children().length <= 5 ) return;

    // get all the hrefs
    App.root = App.linkytarget;
  7. mogsdad revised this gist Sep 28, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.7
    // @version 1.2.8
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://\w*.?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/((questions/(new|popular|need-answers)|search).*)?/
    @@ -30,6 +30,9 @@ function tagList() {
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });

    // Bail out if we don't have 2+ posts
    if( $(App.linkytarget).children().length <= 1 ) return;

    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
  8. mogsdad revised this gist Sep 27, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.6
    // @version 1.2.7
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://\w*.?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/((questions/(new|popular|need-answers)|search).*)?/
  9. mogsdad revised this gist Sep 27, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,9 @@ var runTagList = tagList();
    $(document).ajaxComplete(tagList);

    function tagList() {
    // If list already present, quit.
    if ($('.linkylist').length) return;

    var App = {};

    userscriptCSS();
  10. mogsdad revised this gist Sep 27, 2015. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -3,12 +3,16 @@
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.5
    // @version 1.2.6
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/(questions/(new|popular|need-answers)|search).*/
    // @include /^https?://\w*.?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/((questions/(new|popular|need-answers)|search).*)?/
    // ==/UserScript==

    var runTagList = tagList();

    $(document).ajaxComplete(tagList);

    function tagList() {
    var App = {};

    @@ -79,4 +83,3 @@ function tagList() {
    head.appendChild(newCss);
    }
    }
    var runTagList = tagList();
  11. mogsdad revised this gist Sep 23, 2015. 1 changed file with 64 additions and 44 deletions.
    108 changes: 64 additions & 44 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -9,54 +9,74 @@
    // @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/(questions/(new|popular|need-answers)|search).*/
    // ==/UserScript==

    var App = {};
    function tagList() {
    var App = {};

    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();
    userscriptCSS();

    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();

    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });
    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });

    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (App.hrefs.length === 0) {
    console.log("No post hyperlinks found");
    return;
    }
    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (App.hrefs.length === 0) {
    console.log("No post hyperlinks found");
    return;
    }

    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(App.listbody);
    App.listroot.prepend(App.listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(App.listbody);
    App.listroot.prepend(App.listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    });
    });
    });
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });

    $('body').append(
    $('<style>' +
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}' +
    '</style>')
    );
    /**
    * Define "CSS" for this user script
    */
    function userscriptCSS() {
    addCss(
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }

    /**
    * Stuff string of styles into doc head.
    */
    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }
    }
    var runTagList = tagList();
  12. mogsdad revised this gist Sep 23, 2015. 1 changed file with 44 additions and 65 deletions.
    109 changes: 44 additions & 65 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -9,75 +9,54 @@
    // @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/(questions/(new|popular|need-answers)|search).*/
    // ==/UserScript==

    window.addEventListener("load", function() {
    // script injection
    var App = {};
    var App = {};

    userscriptCSS();

    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();
    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();

    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });
    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });

    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (App.hrefs.length === 0) {
    console.log("No post hyperlinks found");
    return;
    }
    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (App.hrefs.length === 0) {
    console.log("No post hyperlinks found");
    return;
    }

    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(App.listbody);
    App.listroot.prepend(App.listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    });
    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(App.listbody);
    App.listroot.prepend(App.listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    });
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });

    /**
    * Define "CSS" for this user script
    */
    function userscriptCSS() {
    addCss(
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }

    /**
    * Stuff string of styles into doc head.
    */
    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }

    }, false);
    $('body').append(
    $('<style>' +
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}' +
    '</style>')
    );
  13. mogsdad revised this gist Sep 23, 2015. 1 changed file with 62 additions and 71 deletions.
    133 changes: 62 additions & 71 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -3,90 +3,81 @@
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.4
    // @version 1.2.5
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/(questions/(new|popular|need-answers)|search).*/
    // @require http://code.jquery.com/jquery-latest.js
    // ==/UserScript==
    function exec(fn) {
    var script = document.createElement('script');
    script.setAttribute("type", "application/javascript");
    script.textContent = '(' + fn + ')();';
    document.body.appendChild(script); // run the script
    document.body.removeChild(script); // clean up
    }

    window.addEventListener("load", function() {
    // script injection
    exec(function() {
    var App = this;
    var App = {};

    userscriptCSS();
    userscriptCSS();

    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();
    //console.log(App.linkytarget);
    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();

    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });
    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });

    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (hrefs.length === 0) {
    console.log("No post hyperlinks found");
    return;
    }
    // get all the hrefs
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (App.hrefs.length === 0) {
    console.log("No post hyperlinks found");
    return;
    }

    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(listbody);
    App.listroot.prepend(listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    });
    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(App.listbody);
    App.listroot.prepend(App.listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    });
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });

    /**
    * Define "CSS" for this user script
    */
    function userscriptCSS() {
    addCss(
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }
    /**
    * Define "CSS" for this user script
    */
    function userscriptCSS() {
    addCss(
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }

    /**
    * Stuff string of styles into doc head.
    */
    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }
    });
    /**
    * Stuff string of styles into doc head.
    */
    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }

    }, false);
  14. mogsdad revised this gist Sep 22, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -23,18 +23,18 @@ window.addEventListener("load", function() {

    userscriptCSS();

    // Some question lists have a question-mini-list div, searches don't. To simplify, we'll insert our own if needed.
    App.linkytarget = $('.question').length ? '.question' : $('.welovestackoverflow').length ? '.welovestackoverflow' : '.search-results';
    if (!($('#question-mini-list').length)) $('<div id=question-mini-list></div>').insertAfter(App.linkytarget);
    // Locate the element containing list of posts.
    App.linkytarget = $('.question-summary').parent();
    //console.log(App.linkytarget);

    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo('#question-mini-list');
    App.items.closest('.question-summary').detach().appendTo(App.linkytarget);
    });

    // get all the hrefs
    App.root = $('#question-mini-list');
    App.root = App.linkytarget;
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (hrefs.length === 0) {
    console.log("No post hyperlinks found");
    @@ -44,7 +44,7 @@ window.addEventListener("load", function() {
    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    $(App.linkytarget).before(App.listroot);
    App.linkytarget.before(App.listroot);
    App.listroot.prepend(listbody);
    App.listroot.prepend(listhead);
    App.listbody.hide();
  15. mogsdad revised this gist Sep 20, 2015. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,6 @@ window.addEventListener("load", function() {

    // Some question lists have a question-mini-list div, searches don't. To simplify, we'll insert our own if needed.
    App.linkytarget = $('.question').length ? '.question' : $('.welovestackoverflow').length ? '.welovestackoverflow' : '.search-results';
    console.log("linkytarget: "+App.linkytarget);
    if (!($('#question-mini-list').length)) $('<div id=question-mini-list></div>').insertAfter(App.linkytarget);

    // re-sort list; move all the already handled cruff to the top
    @@ -36,9 +35,9 @@ window.addEventListener("load", function() {

    // get all the hrefs
    App.root = $('#question-mini-list');
    App.hrefs = App.root.find('.question-hyperlink,.result-link');
    App.hrefs = App.root.find('.question-hyperlink,.result-link'); // .result-link on searches, .question-hyperlink everywhere else
    if (hrefs.length === 0) {
    console.log("No .question-hyperlink found");
    console.log("No post hyperlinks found");
    return;
    }

  16. mogsdad revised this gist Sep 20, 2015. 1 changed file with 12 additions and 6 deletions.
    18 changes: 12 additions & 6 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,10 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.2.3
    // @namespace http://stackapps.com/questions/4207/burninator-toolkit
    // @author Will Sullivan (Will)
    // @developer David Bingham (Mogsdad)
    // @version 1.2.4
    // @grant none
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/(questions/(new|popular|need-answers)|search).*/
    // @require http://code.jquery.com/jquery-latest.js
    @@ -21,7 +24,8 @@ window.addEventListener("load", function() {
    userscriptCSS();

    // Some question lists have a question-mini-list div, searches don't. To simplify, we'll insert our own if needed.
    App.linkytarget = $('.question').length ? '.welovestackoverflow' : '.question';
    App.linkytarget = $('.question').length ? '.question' : $('.welovestackoverflow').length ? '.welovestackoverflow' : '.search-results';
    console.log("linkytarget: "+App.linkytarget);
    if (!($('#question-mini-list').length)) $('<div id=question-mini-list></div>').insertAfter(App.linkytarget);

    // re-sort list; move all the already handled cruff to the top
    @@ -32,14 +36,16 @@ window.addEventListener("load", function() {

    // get all the hrefs
    App.root = $('#question-mini-list');
    App.hrefs = App.root.find('.question-hyperlink');
    if (hrefs.length === 0)
    App.hrefs = App.root.find('.question-hyperlink,.result-link');
    if (hrefs.length === 0) {
    console.log("No .question-hyperlink found");
    return;
    }

    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    $('.question').before(App.listroot);
    $(App.linkytarget).before(App.listroot);
    App.listroot.prepend(listbody);
    App.listroot.prepend(listhead);
    App.listbody.hide();
  17. mogsdad revised this gist Sep 20, 2015. 1 changed file with 5 additions and 10 deletions.
    15 changes: 5 additions & 10 deletions TaggedQuestionList.user.js
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,10 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.2.2
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.2.3
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @match *://*.stackoverflow.com/questions/*
    // @match http://stackoverflow.com/*tag*/*
    // @match http://stackoverflow.com/questions/*
    // @match http://stackoverflow.com/questions/new
    // @match http://stackoverflow.com/search*
    // @match http://meta.stackoverflow.com/*tag*/*
    // @require http://code.jquery.com/jquery-latest.js
    // @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/(questions/(new|popular|need-answers)|search).*/
    // @require http://code.jquery.com/jquery-latest.js
    // ==/UserScript==
    function exec(fn) {
    var script = document.createElement('script');
  18. mogsdad renamed this gist Sep 20, 2015. 1 changed file with 0 additions and 0 deletions.
  19. mogsdad revised this gist Sep 20, 2015. 1 changed file with 64 additions and 54 deletions.
    118 changes: 64 additions & 54 deletions TaggedQuestionList.userscript
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.2.0
    // @version 1.2.2
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @match *://*.stackoverflow.com/questions/*
    // @match http://stackoverflow.com/*tag*/*
    @@ -18,65 +18,75 @@ function exec(fn) {
    document.body.appendChild(script); // run the script
    document.body.removeChild(script); // clean up
    }
    window.addEventListener("load", function () {
    window.addEventListener("load", function() {
    // script injection
    exec(function () {
    exec(function() {
    var App = this;

    userscriptCSS();

    // Some question lists have a question-mini-list div, searches don't. To simplify, we'll insert our own if needed.
    if ( !($('#question-mini-list').length) ) $('<div id=question-mini-list></div>').insertAfter('.welovestackoverflow');
    //$('<p class="linkyhead">Click here to open a list of all links on this page</p>').insertBefore('#question-mini-list'); // Temp - OK location
    App.linkytarget = $('.question').length ? '.welovestackoverflow' : '.question';
    if (!($('#question-mini-list').length)) $('<div id=question-mini-list></div>').insertAfter(App.linkytarget);

    // re-sort list; move all the already handled shit to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function (index)
    {
    var items = $('.question-summary .summary:contains(' + this + ')');
    //items.closest('.question-summary').detach().insertAfter('.search-results');
    items.closest('.question-summary').detach().appendTo('#question-mini-list');
    // re-sort list; move all the already handled cruff to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function(index) {
    App.items = $('.question-summary .summary:contains(' + this + ')');
    App.items.closest('.question-summary').detach().appendTo('#question-mini-list');
    });
    //return;

    // get all the hrefs
    var root = $('#mainbar');
    var hrefs = root.find('.question-hyperlink');
    console.log(hrefs);
    App.root = $('#question-mini-list');
    App.hrefs = App.root.find('.question-hyperlink');
    if (hrefs.length === 0)
    return;
    console.log('here4');
    // I totally copypasted this.
    //$('head').append($('<style type="text/css">.linkylist {margin: 0px;padding: 0px;}.linkyhead {padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}</style>'));
    var listroot = $('<div class="linkylist"/>');
    var listhead = $('<p class="linkyhead">Click here to open a list of all links on this page</p>');
    var listbody = $('<div class="linkybody"/>');
    $('.question').before(listroot);
    listroot.prepend(listbody);
    listroot.prepend(listhead);
    listbody.hide();
    listhead.click(function (){ listbody.slideToggle(600); });
    // note that when you click a link it gets removed from the list.
    hrefs.each(function ()
    {
    var parent = $('<span class="linkeyspan"/>');
    var linkey = $(this).clone().attr('target','_blank');
    linkey.click(function () { $(this).closest('.linkeyspan').remove(); });
    parent.prepend(linkey);
    parent.prepend($('<br/>'));
    listbody.prepend(parent);
    });

    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }

    function userscriptCSS() {
    addCss (
    '.linkylist {margin: 0px;padding: 0px;}.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }

    });
    }, false);

    App.listroot = $('<div class="linkylist"/>');
    App.listhead = $('<p class="linkyhead">Click here to <span id="linkyaction">open</span> a list of all links on this page</p>');
    App.listbody = $('<div class="linkybody"/>');
    $('.question').before(App.listroot);
    App.listroot.prepend(listbody);
    App.listroot.prepend(listhead);
    App.listbody.hide();
    App.listhead.click(function() {
    App.listbody.slideToggle(600);
    $('#linkyaction').text(function (index, text) {
    return (text == 'open' ? 'close' : 'open');
    });
    });
    // note that when you click a link it gets removed from the list.
    App.hrefs.each(function() {
    App.parent = $('<span class="linkeyspan"/>');
    App.linkey = $(this).clone().attr('target', '_blank');
    App.linkey.click(function() {
    $(this).closest('.linkeyspan').remove();
    });
    App.parent.prepend(App.linkey);
    App.parent.prepend($('<br/>'));
    App.listbody.prepend(App.parent);
    });

    /**
    * Define "CSS" for this user script
    */
    function userscriptCSS() {
    addCss(
    '.linkylist {margin: 0px;padding: 0px;}' +
    '.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;}' +
    '.linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }

    /**
    * Stuff string of styles into doc head.
    */
    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }
    });
    }, false);
  20. mogsdad revised this gist Sep 20, 2015. 1 changed file with 41 additions and 11 deletions.
    52 changes: 41 additions & 11 deletions TaggedQuestionList.userscript
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,15 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.1
    // @version 1.2.0
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @match *://*.stackoverflow.com/questions/*
    // @match http://stackoverflow.com/*tag*/*
    // @match http://stackoverflow.com/questions/*
    // @match http://stackoverflow.com/questions/new
    // @match http://stackoverflow.com/search*
    // @match http://meta.stackoverflow.com/*tag*/*
    // @require http://code.jquery.com/jquery-latest.js
    // ==/UserScript==
    function exec(fn) {
    var script = document.createElement('script');
    @@ -15,20 +20,29 @@ function exec(fn) {
    }
    window.addEventListener("load", function () {
    // script injection
    exec(function () {
    // move all the already handled shit to the top
    $.each(["closed", "on hold", "migrated", "duplicate",], function (index)
    exec(function () {
    userscriptCSS();
    // Some question lists have a question-mini-list div, searches don't. To simplify, we'll insert our own if needed.
    if ( !($('#question-mini-list').length) ) $('<div id=question-mini-list></div>').insertAfter('.welovestackoverflow');
    //$('<p class="linkyhead">Click here to open a list of all links on this page</p>').insertBefore('#question-mini-list'); // Temp - OK location

    // re-sort list; move all the already handled shit to the top
    $.each(["closed", "on hold", "migrated", "duplicate"], function (index)
    {
    var items = $('a:contains(' + this + ')');
    items.closest('.question-summary').detach().appendTo('#questions');
    var items = $('.question-summary .summary:contains(' + this + ')');
    //items.closest('.question-summary').detach().insertAfter('.search-results');
    items.closest('.question-summary').detach().appendTo('#question-mini-list');
    });
    //return;
    // get all the hrefs
    var root = $('#questions');
    var root = $('#mainbar');
    var hrefs = root.find('.question-hyperlink');
    console.log(hrefs);
    if (hrefs.length === 0)
    return;
    console.log('here4');
    // I totally copypasted this.
    $('head').append($('<style type="text/css">.linkylist {margin: 0px;padding: 0px;}.linkyhead {padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}</style>'));
    //$('head').append($('<style type="text/css">.linkylist {margin: 0px;padding: 0px;}.linkyhead {padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}</style>'));
    var listroot = $('<div class="linkylist"/>');
    var listhead = $('<p class="linkyhead">Click here to open a list of all links on this page</p>');
    var listbody = $('<div class="linkybody"/>');
    @@ -41,12 +55,28 @@ window.addEventListener("load", function () {
    hrefs.each(function ()
    {
    var parent = $('<span class="linkeyspan"/>');
    var linkey = $(this).clone();
    var linkey = $(this).clone().attr('target','_blank');
    linkey.click(function () { $(this).closest('.linkeyspan').remove(); });
    parent.prepend(linkey);
    parent.prepend($('<br/>'));
    listbody.prepend(parent);
    });

    });

    function addCss(cssString) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    head.appendChild(newCss);
    }

    function userscriptCSS() {
    addCss (
    '.linkylist {margin: 0px;padding: 0px;}.linkyhead {text-align: right;padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}'
    );
    }

    });
    }, false);

  21. @WillSullivan WillSullivan revised this gist Jul 19, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion TaggedQuestionList.userscript
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ window.addEventListener("load", function () {
    $.each(["closed", "on hold", "migrated", "duplicate",], function (index)
    {
    var items = $('a:contains(' + this + ')');
    items.closest('.question-summary').detach().prependTo('#questions');
    items.closest('.question-summary').detach().appendTo('#questions');
    });
    // get all the hrefs
    var root = $('#questions');
  22. @WillSullivan WillSullivan revised this gist Jul 19, 2013. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions TaggedQuestionList.userscript
    Original file line number Diff line number Diff line change
    @@ -16,17 +16,17 @@ function exec(fn) {
    window.addEventListener("load", function () {
    // script injection
    exec(function () {
    // get all the hrefs
    var root = $('#questions');
    var hrefs = root.find('.question-hyperlink');
    if (hrefs.length === 0)
    return;
    // move all the already handled shit to the top
    $.each(["closed", "on hold", "migrated", "duplicate",], function (index)
    {
    var items = $('a:contains(' + this + ')');
    items.closest('.question-summary').detach().prependTo('#questions');
    });
    // get all the hrefs
    var root = $('#questions');
    var hrefs = root.find('.question-hyperlink');
    if (hrefs.length === 0)
    return;
    // I totally copypasted this.
    $('head').append($('<style type="text/css">.linkylist {margin: 0px;padding: 0px;}.linkyhead {padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}</style>'));
    var listroot = $('<div class="linkylist"/>');
  23. @WillSullivan WillSullivan revised this gist Jul 19, 2013. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions TaggedQuestionList.userscript
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,10 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.0
    // @version 1.1
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @match http://stackoverflow.com/*tag*/*
    // @match http://meta.stackoverflow.com/*tag*/*
    // ==/UserScript==
    function exec(fn) {
    var script = document.createElement('script');
    @@ -20,8 +21,13 @@ window.addEventListener("load", function () {
    var hrefs = root.find('.question-hyperlink');
    if (hrefs.length === 0)
    return;

    // I totally copypasted this.
    // move all the already handled shit to the top
    $.each(["closed", "on hold", "migrated", "duplicate",], function (index)
    {
    var items = $('a:contains(' + this + ')');
    items.closest('.question-summary').detach().prependTo('#questions');
    });
    // I totally copypasted this.
    $('head').append($('<style type="text/css">.linkylist {margin: 0px;padding: 0px;}.linkyhead {padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}</style>'));
    var listroot = $('<div class="linkylist"/>');
    var listhead = $('<p class="linkyhead">Click here to open a list of all links on this page</p>');
  24. @WillSullivan WillSullivan created this gist Jul 8, 2013.
    46 changes: 46 additions & 0 deletions TaggedQuestionList.userscript
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    // ==UserScript==
    // @name Tag list
    // @namespace http://statestreetgang.net/
    // @version 1.0
    // @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
    // @match http://stackoverflow.com/*tag*/*
    // ==/UserScript==
    function exec(fn) {
    var script = document.createElement('script');
    script.setAttribute("type", "application/javascript");
    script.textContent = '(' + fn + ')();';
    document.body.appendChild(script); // run the script
    document.body.removeChild(script); // clean up
    }
    window.addEventListener("load", function () {
    // script injection
    exec(function () {
    // get all the hrefs
    var root = $('#questions');
    var hrefs = root.find('.question-hyperlink');
    if (hrefs.length === 0)
    return;

    // I totally copypasted this.
    $('head').append($('<style type="text/css">.linkylist {margin: 0px;padding: 0px;}.linkyhead {padding: 5px 10px;cursor: pointer;position: relative;background-color:#FFCCCC;margin:1px;} .linkybody {padding: 5px 10px 15px;background-color:#F4F4F8;}</style>'));
    var listroot = $('<div class="linkylist"/>');
    var listhead = $('<p class="linkyhead">Click here to open a list of all links on this page</p>');
    var listbody = $('<div class="linkybody"/>');
    $('.question').before(listroot);
    listroot.prepend(listbody);
    listroot.prepend(listhead);
    listbody.hide();
    listhead.click(function (){ listbody.slideToggle(600); });
    // note that when you click a link it gets removed from the list.
    hrefs.each(function ()
    {
    var parent = $('<span class="linkeyspan"/>');
    var linkey = $(this).clone();
    linkey.click(function () { $(this).closest('.linkeyspan').remove(); });
    parent.prepend(linkey);
    parent.prepend($('<br/>'));
    listbody.prepend(parent);
    });

    });
    }, false);