Mostra notizie nelle discussioni
  • Avatar
    ☺
    Scritto da
    ::1
    il 2013-05-13 18:37:26.0 alle 2013-05-13 18:37:26.0
    Trollate totali: 12321
    ci sono redditors all'ascolto?
    Stavo cercando un modo per vedere tutti i miei subreddit, perché di default nella tendina ce ne sono solo 50, alla fine me lo sono creato da me.
    Con scriptish (ma con greasemonkey funziona lo stesso) ho scritto questo:
    // ==UserScript==
    // @id             subreddits
    // @name           subreddits
    // @version        1.0
    // @namespace      
    // @author         
    // @description    
    // @include        http://www.reddit.com/subreddits/
    // @run-at         document-end
    // ==/UserScript==
    
    var subs = Array.prototype.slice.call(
        document.querySelectorAll(
            '.subscription-box > .clear > ul > li > a'
        )
    ).map(function(node) {
        return node.childNodes[0].nodeValue;
    });
    var html = subs.map(function(subName) {
        return "<a href='/r/" + subName + "'>" + subName + "</a>";
    }).join(" ");
    
    html += "<style>a {font-size: 14px; font-family: serif; padding-left: 1em;} body {padding: 5em 5em 5em 5em;}</style>"
    
    document.body.innerHTML = html;
    

    Così visito direttamente http://www.reddit.com/subreddits/ e ho già quello che cerco.
    Young professional woman and busy mom.
    • Avatar
      ☺
      Scritto da
      Seu
      Trombeur de femmes
      il 2013-05-13 18:45:28.0 alle 2013-05-13 18:45:28.0
      Trollate totali: 2082
      Re: ci sono redditors all'ascolto?
      Scritto da: ::1
      > Stavo cercando un modo per vedere tutti i miei subreddit, perché di default nella tendina ce ne sono solo 50, alla fine me lo sono creato da me.
      > Con scriptish (ma con greasemonkey funziona lo stesso) ho scritto questo:
      >
      > // ==UserScript==
      > // @id             subreddits
      > // @name           subreddits
      > // @version        1.0
      > // @namespace      
      > // @author         
      > // @description    
      > // @include        http://www.reddit.com/subreddits/
      > // @run-at         document-end
      > // ==/UserScript==
      > 
      > var subs = Array.prototype.slice.call(
      > document.querySelectorAll(
      > '.subscription-box > .clear > ul > li > a'
      > )
      > ).map(function(node) {
      > return node.childNodes[0].nodeValue;
      > });
      > var html = subs.map(function(subName) {
      > return "<a href='/r/" + subName + "'>" + subName + "</a>";
      > }).join(" ");
      > 
      > html += "<style>a {font-size: 14px; font-family: serif; padding-left: 1em;} body {padding: 5em 5em 5em 5em;}</style>"
      > 
      > document.body.innerHTML = html;
      > 

      > Così visito direttamente http://www.reddit.com/subreddits/ e ho già quello che cerco.

      Mercì
      Atoms & Love
<softv>

Pagina generata in 55 millisecondi

Utenti attivi: 9 nell'ultimo minuto, 28 negli ultimi cinque minuti, 62 negli ultimi 15 minuti