Greasy Fork is available in English.

Discuții » Cerere de creare

twitter view conversation

§
Postat în: 03-07-2015

twitter view conversation

I'm trying to archive some stuff around twitter hashtags and I want to view the conversations around the hashtag. I've been clicking the "view conversation" link by hand. Is there a way to automate this so it would automatically expand all the conversations on a twitter search page? I'm not sure a greasemonkey script would be the best way to do this. Maybe a bookmarklet or something? I've looked through the source and my knowledge of javascript isn't sufficient to make sense of how to make this work.

§
Postat în: 12-07-2015
Editat în: 13-07-2015
// ==UserScript==
// @name         twitter conversation opener
// @version      0.2
// @description  expands conversations?
// @author       vG Rejected
// @match        *://twitter.com/*
// @grant        none
// @require      http://code.jquery.com/jquery-latest.js
// @namespace https://greasyfork.org/users/9702
// ==/UserScript==

document.addEventListener("DOMContentLoaded", viewConversations, false );

if( document.readyState == "complete" ) {
    conversationInterval = setInterval(viewConversations(), 30000);//30 second refresh rate
}

function viewConversations() {
    $("span.expand-stream-item.js-view-details").click();
}

Alright, I think I got it figured out, and this should be working, now setInterval is just to open any new conversations twitter might load into your feed, but you can easily remove that.

Note: I know jQuery isn't necessary in the head since twitter already runs jQuery, but I'm leaving it there anyways.

You can also install it through here.

Or you could simply use:

javascript:$("span.expand-stream-item.js-view-details").click();
but you will have to put this in as you scroll down, navigate, etc..

§
Postat în: 15-07-2015

Awesome! Thanks!

Postează un raspuns

Autentifică-te pentru a posta un răspuns.