install
1. save source to twitter_replylist.user.js
2. change source code 'your username' & 'your password'
Reply list JS for Opera UserScript
// ==UserScript== // @name twitterExt_listreply // @namespace http://d.hatena.ne.jp/Nilfs/ // @description list reply extension // @include https://twitter.com/* // @include http://twitter.com/* // ==/UserScript== (function(){ // config var myName = "your username" var myPassword = "your password"; var src_url = 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'; // jQuery loading var s=document.createElement('script'); s.setAttribute('src',src_url); document.getElementsByTagName('head')[0].appendChild(s); var id = window.setInterval(function(){ if (window['jQuery'] && window['jQuery']['fn'] && window['jQuery']['fn']['offset'] ){ window.clearInterval(id); onLoadjQueryComplete(); } },100); function onLoadjQueryComplete() { $("#update-submit").click( function(event){ event.stopImmediatePropagation(); event.preventDefault(); var messageInfo = getMessageInfo(); var url = createGetListMemberApiUrl(messageInfo.userName, messageInfo.listName); if( !url ){ return false; // return true } // convert list2memberID var requestResult = $.ajax({ "url": url, "data": { "cursor": -1 }, "dataType":"jsonp", "success": function(data, status) { var replyStr = ""; var length = data.users.length; for( var i=0; i<length; ++i ) { if( data.users[i].screen_name ) replyStr += "@"+data.users[i].screen_name+" "; } var postData = replyStr+""+messageInfo.body; $("#status").val(postData); $("#status_update_form").submit(); }, "username":myName, "password":myPassword, }); return false; } ); } function getMessageInfo() { var postContents = $("#status").val(); var startPos = postContents.indexOf("@"); var endPos = postContents.indexOf(" "); if( startPos == -1 || endPos == -1 ) return false; // extract message var messageBody = postContents.substring(endPos+1); // endPos + 1 => exclude ' ' // extract reply info var replyTarget = postContents.substr( startPos+1, endPos-1 ).split("/"); // startPos + 1 => exclude '@', ' ' if( replyTarget.length != 2 ) return false; var userName; var listName; if( replyTarget[0] == "" ){ userName = $("meta[name=session-user-screen_name]").attr("content"); if( typeof userName == 'undefined'){ alert("error: cannot get my name."); return false; } listName = replyTarget[1]; } else{ userName = replyTarget[0]; listName = replyTarget[1]; } return { "userName":userName, "listName":listName, "body":messageBody }; } function createGetListMemberApiUrl( userName, listName ) { return "http://api.twitter.com/1/"+userName+"/"+listName+"/members.json?callback=?"; } })();
usage
This script is a script that operates by Twitter.com.
1.The message is input by the format of '@username/listname messagebody'.
2.It is transmitted as 'Reply' to all users included in the list specified that the Update button is pushed.