User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Request features for a TWW Greasemonkey script Page 1 [2] 3 4 5 6 7 8, Prev Next  
FroshKiller
All American
51880 Posts
user info
edit post

I've pretty much always had technical skills on account of growing up around computing. I've started using them more in my current job and am open to a technical career, but it's not really new. Like they say, I never let my formal education get in the way of my learning.

[Edited on July 30, 2009 at 1:24 PM. Reason : Peace, we outta here.]

7/30/2009 1:24:24 PM

FroshKiller
All American
51880 Posts
user info
edit post

Version 0.2 is up: http://jlhamilt.freeshell.org/better_wolf_web.user.js

Release notes:

* Instead of PM parsing, I decided to experiment with something a little more radical. Click the wolf icon in the header to toggle a quick message board search box!
* Simple user blocking is there. Check the source for details. Works in the message board list, thread list, and threads themselves.
* Cool MP3 link handling: An embedded player lets you stream the file instantly, and a download link is provided beneath it. Example:

http://jlhamilt.freeshell.org/audio/beautiful_life.mp3

[Edited on July 30, 2009 at 4:39 PM. Reason : w00t]

7/30/2009 4:34:07 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

Very nice

7/30/2009 4:39:52 PM

qntmfred
retired
40370 Posts
user info
edit post

well done sir. given the go-ahead, i'd love to integrate some of these features into the main codebase at some point

[Edited on July 30, 2009 at 4:47 PM. Reason : i like how lilalavendar and not dnl are blocked users by default. ]

7/30/2009 4:46:04 PM

FroshKiller
All American
51880 Posts
user info
edit post

Glad you guys are digging it. Extra-special bit I forgot to mention: AUTOSTART PROTECTION. No more EMBEDs blaring out at you without warning.

In future versions, I plan to add a dialog constructor so you can dynamically create your own Wolf Web-styled widgets similar to my search box. I still want to get around to PM parsing, too.

But the real hot shit is going to be the more user-friendly blocking feature. Imagine a dialog that lets you manage your blocked users, adding and removing them without leaving the browser window. Imagine the option to click and see the blocked post...or the option to never see a blocked user at all. Oh yeah. It's percolating.

[Edited on July 30, 2009 at 4:50 PM. Reason : ...]

7/30/2009 4:47:39 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

Image resizing... maybe I misunderstood what it does, but the one in the OP didn't get auto-resized for me here: message_topic.aspx?topic=572542

7/30/2009 4:58:17 PM

FroshKiller
All American
51880 Posts
user info
edit post

Well spotted. Patched. Reinstall.

7/30/2009 5:02:00 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

That, my friend, is A+. Will buy from again!!

7/30/2009 5:12:23 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

Oh yeah, there's always the annoying part of replying to a thread... clicking any of the buttons adds whatever to the end of the text box, not at the cursor. That, and the iframe below not showing the last page of the thread. Any hope for fixing that?

7/30/2009 5:45:15 PM

grimx
#maketwwgreatagain
32337 Posts
user info
edit post

lol at blocked users

[Edited on July 30, 2009 at 7:05 PM. Reason : aha wins]

7/30/2009 7:04:39 PM

El Nachó
special helper
16370 Posts
user info
edit post

If it's possible, I'd love for blocked users to also disappear from the chatterbox too.

I still see blah blah blah son blah blah blah son up there.

Actually if you could just remove all instances of the word son from SaabLameo's posts, he might be tolerable.

7/30/2009 9:32:18 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

In addition to what I said ^^^ there, can we make the frame wider??

7/31/2009 3:41:03 AM

FroshKiller
All American
51880 Posts
user info
edit post

Quote :
"Oh yeah, there's always the annoying part of replying to a thread... clicking any of the buttons adds whatever to the end of the text box, not at the cursor."


I could do it, but it'd require replacing the scripts attached to each button, and I don't want to do that.

Quote :
"That, and the iframe below not showing the last page of the thread. Any hope for fixing that?"


Here's how that would work: The script already assigns the ID "page_link" to the table cell containing the links to the other pages. It could check to see if you're replying to a thread by parsing the document's location, take the HREF attribute of the second-to-last anchor descending from td#page_links, and modify the SRC attribute of the IFRAME. It would be a very ugly way to do it, but it would work. It would mean wasted pages served from the site, though. I'm trying to keep the impact this script has on the site itself neutral.

Quote :
"If it's possible, I'd love for blocked users to also disappear from the chatterbox too."


I want to make the script useful for most people using it, and most people are not premium. I do plan to add special handling for some differences in the content premium subscribers see, but it's not even on my radar right now. I don't have a premium subscription for testing anyway.

That said, the blocking feature as it's written can't accommodate the chatterbox. It blocks based on user ID, and the chatterbox only displays usernames. You could probably write something yourself, though. The chatterbox is pretty much a table wrapped in a form embedded in a table cell. The form's ACTION attribute contains the word "chatterbox." A line of text consists of the username wrapped in a B element, a text node, and a BR element.

Quote :
"can we make the frame wider??"


It's kind of squished into a cell and is as wide as it can be. I could probably pop it out of the cell and widen it, but for the work it'd take to change the structure of the page, I don't think there's much of a return there. That does give me an idea for another feature, though.

7/31/2009 6:32:09 AM

wdprice3
BinaryBuffonary
45908 Posts
user info
edit post

lol, you have dnl on autoblock?? all his stuff is blocked for me, though I never blocked him

7/31/2009 8:30:38 AM

FroshKiller
All American
51880 Posts
user info
edit post

I chose not dnl and lilalavender as default test cases for blocking. I didn't think anyone would mind.

7/31/2009 8:33:12 AM

wdprice3
BinaryBuffonary
45908 Posts
user info
edit post

nope

7/31/2009 8:57:16 AM

FroshKiller
All American
51880 Posts
user info
edit post

Okay, 0.3 is probably not going to be an exciting release. Here is a rundown of the changes I'm working on:

* Reorganizing the scaffolding procedures, i.e. what order they're executed in. I think I can get this going faster, and if I get the order right, I should produce a nice cascade of data available right when helper methods need it.
* Reworking the slide-down search box to adapt to the current message board.
* Tentatively planning to include a working quote & reply function, but I don't even have that working yet.

7/31/2009 9:40:12 AM

qntmfred
retired
40370 Posts
user info
edit post

you mind adding the search by user fields to the quick search thing?

7/31/2009 9:58:55 AM

FroshKiller
All American
51880 Posts
user info
edit post

Can do. Might even get fancy with it!

7/31/2009 10:02:23 AM

jocristian
All American
7506 Posts
user info
edit post

How might one edit the source and reinstall (for the purposes of adding userID 35889 to the block list)?

7/31/2009 10:10:15 AM

FroshKiller
All American
51880 Posts
user info
edit post

Right-click the Greasemonkey icon in the lower righthand corner of your browser window and choose Manage Userscripts. Choose Better Wolf Web from the list and click the Edit button.

7/31/2009 10:11:49 AM

jocristian
All American
7506 Posts
user info
edit post

Thank you, sir.

7/31/2009 10:17:05 AM

Sweden
All American
12276 Posts
user info
edit post

Microphone check 1
Microphone check 2
Peace, this is a very nice add-on.

Any chance of a link resize like the photo one? Example:
message_topic.aspx?topic=567656&page=3#13106443

7/31/2009 10:19:00 AM

jocristian
All American
7506 Posts
user info
edit post

scanning chit chat without euphalo is refreshing

7/31/2009 2:08:30 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

agreed. it's f'in awesome actually. an easier way of changing who is blocked would be cool but not a big deal

[Edited on July 31, 2009 at 2:14 PM. Reason : a]

7/31/2009 2:10:14 PM

FroshKiller
All American
51880 Posts
user info
edit post

Easier blocking is definitely on my mind. I'm pretty sure I can use GM_setValue and GM_getValue to track your blocking preferences persistently.

7/31/2009 2:46:23 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

well, i can change it pretty quick now.. i was trying to figure out the best way to open the .js file, change stuff, save it & reinstall. first time took me a little while but can do it in like 30 seconds now

7/31/2009 2:50:25 PM

FroshKiller
All American
51880 Posts
user info
edit post

Hey, why work hard?

7/31/2009 3:01:01 PM

ParksNrec
All American
8741 Posts
user info
edit post

A++ work Frosh, fantastic job

7/31/2009 3:53:01 PM

Sweden
All American
12276 Posts
user info
edit post

We need to have the ability for statsbot to run a report on the most blocked users once this is fully functional.

7/31/2009 3:57:07 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

pretty bad he still hasn't been banned for all the bullshit..

7/31/2009 4:32:28 PM

FroshKiller
All American
51880 Posts
user info
edit post

I could in theory use T-Dub's Google Analytics tracker to track certain script events, e.g. when someone chooses to ban a user through the newer interface I'm working on. It'd be up to qntmfred to report shit like that, though.

7/31/2009 4:35:34 PM

jocristian
All American
7506 Posts
user info
edit post

I don't think we need statistics to tell us that noone wants to read anything by RD or dnl

7/31/2009 4:38:00 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

anyway you can make the "this thread is by a block user" text be a link to the thread?

7/31/2009 4:42:36 PM

FroshKiller
All American
51880 Posts
user info
edit post

Yes, I'm planning to allow you to toggle the visibility of a blocked threads/post/PM.

It's pretty clear that blocking is the important feature for you guys.

[Edited on July 31, 2009 at 4:46 PM. Reason : ...]

7/31/2009 4:45:40 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

it is, haha

7/31/2009 4:59:29 PM

FroshKiller
All American
51880 Posts
user info
edit post

Okay, here's the bad news. In the next release, your lists of banned users will be absolutely worthless.

The good news is that you'll be able to add and remove users from your block list by clicking a link on the user's profile, and this data will persist across sessions without the use of cookies, the awkward re-declaration of variables, or ritual sacrifice.

I still haven't quite mastered toggling the masked posts and threads by banned users, though.

7/31/2009 11:28:38 PM

grimx
#maketwwgreatagain
32337 Posts
user info
edit post

for someone not familiar enough with css scripts...any suggestions or tips to go about the vanity post highlighting and color coded nsfw threads?

or is that something for a future release at some point?

8/1/2009 12:12:37 AM

Fail Boat
Suspended
3567 Posts
user info
edit post

Why not make it another item in the list under their username on a given post? That's the way the existing one works and it works quite well. Any reason not to do it this way?

8/1/2009 11:53:46 AM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

posts are getting pretty long with 4 things over there already.. not a huge deal though

8/1/2009 3:50:46 PM

FroshKiller
All American
51880 Posts
user info
edit post

Honestly, I want it to take some effort to block people. To me, the Wolf Web would not be very interesting if we were all having completely different, sanitized experiences.

8/1/2009 4:36:20 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

THIS ISN'T UP TO YOU OK!!1!

8/1/2009 5:04:48 PM

zorthage
1+1=5
17148 Posts
user info
edit post

Sounds like a config panel of the sorts is warranted:

- vanity coloring
- blocked users (and blocking settings)
- etc


I hate adding UIs to things without a UI already

8/1/2009 5:09:53 PM

BigMan157
no u
103352 Posts
user info
edit post

i added this to your plugin, you're welcome to continue it since i've already gotten bored

it modalizes the inbox, basically

function modalInbox() {
var superStyles = {
'display':'none',
'position':'absolute',
'z-index':'5',
'top':'100px',
'right':'100px',
'left':'100px',
'padding':'5px',
'background-color':'#fff',
'border':'1px solid #333'
};
var superBlockStyles = {
'display':'none',
'position':'absolute',
'z-index':'4',
'top':'0',
'right':'0',
'left':'0',
'height'$('body table').height()),
'background-color':'#000',
'opacity':0.7
};
$("#username").next("a[href*='inbox']").text('superbox').click(function(){
$('embed').css('visibility','hidden');
$.get($(this).attr('href'), function(response) {
var inbox_block = response.replace(/^[\s\S]*<form/, '<form').replace(/<\/form>[\s\S]*$/,'</form>');
//alert(inbox_block);
var superbox = $('<div id="superbox"></div>').css(superStyles).html(inbox_block).appendTo('body');
var superblock = $('<div id="superblock"></div>').css(superBlockStyles).appendTo('body').click(function(){
superbox.fadeOut('fast', function(){
$(this).remove();
superblock.remove();
$('embed').css('visibility','');
});
});
superbox.find("a[href*='mail_inbox.aspx?page='], a[href*='mail_sent.aspx?page=']").each(function(){
addSuperboxPages(this, superbox);
});
superbox.find("tr.medium a[href*='mail_message.aspx?message=']").each(function(){
addSuperboxMessages(this, superbox);
});
superbox.find('select').each(function(){
$(this).unbind();
$(this).removeAttr('onChange');
$(this).change(function(){
addSuperboxSelect(this, superbox);
});
});
//superbox.find("a[href*='mail_compose.aspx']").each(function(){
//});
superblock.fadeIn('fast', function(){
superbox.fadeIn();
});
});
return false;
});
}

function addSuperboxSelect(el, superbox) {
$(el).click(function(){
selectChange = $(el);
superbox.fadeOut('fast', function(){
$.get(selectChange.find(':selected').attr('value'), function(response) {
var inbox_block = response.replace(/^[\s\S]*<form/, '<form').replace(/<\/form>[\s\S]*$/,'</form>');
superbox.html(inbox_block);
superbox.fadeIn('fast', function(){
superbox.find("a[href*='mail_inbox.aspx?page='], a[href*='mail_sent.aspx?page=']").each(function(){
addSuperboxPages(this, superbox);
});
superbox.find("tr.medium a[href*='mail_message.aspx?message=']").each(function(){
addSuperboxMessages(this, superbox);
});
superbox.find('select').each(function(){
$(this).unbind();
$(this).removeAttr('onChange');
$(this).change(function(){
addSuperboxSelect(this, superbox);
});
});
});
});
});
return false;
});
}

function addSuperboxMessages(el, superbox) {
$(el).click(function(){
message = $(el);
superbox.fadeOut('fast', function(){
$.get(message.attr('href'), function(response) {
var inbox_block = response.replace(/^[\s\S]+?<\/table>[\s\S]+?<\/table>[\s\S]+?<\/table>[\s]*<table/, '<table style="margin:0 auto"').replace(/<!--[\s\S]*$/,'').replace(/([\s\S]+)<\/table>[\s\S]+?$/,'$1</table>');
superbox.html(inbox_block);
superbox.fadeIn('fast', function(){
superbox.find('select').each(function(){
$(this).unbind();
$(this).removeAttr('onChange');
$(this).change(function(){
addSuperboxSelect(this, superbox);
});
});
superbox.find("input[type='button']").each(function(){
$(this).unbind();
$(this).removeAttr('onClick');
$(this).click(function(){
$(this).parent().find('select').change();
return false;
});
});
});
});
});
return false;
});
}

function addSuperboxPages(el, superbox) {
//alert($(el).text());
$(el).click(function(){
nextPage = $(el);
superbox.fadeOut('fast', function(){
$.get(nextPage.attr('href'), function(response) {
var inbox_block = response.replace(/^[\s\S]*<form/, '<form style="font-size:5px !important;"').replace(/<\/form>[\s\S]*$/,'</form>');
superbox.html(inbox_block).fadeIn('fast', function(){
superbox.find("a[href*='mail_inbox.aspx?page='], a[href*='mail_sent.aspx?page=']").each(function(){
addSuperboxPages(this, superbox);
});
superbox.find("tr.medium a[href*='mail_message.aspx?message=']").each(function(){
addSuperboxMessages(this, superbox);
});
superbox.find('select').each(function(){
$(this).unbind();
$(this).removeAttr('onChange');
$(this).change(function(){
addSuperboxSelect(this, superbox);
});
});
});
});
});
return false;
});
}


[Edited on August 1, 2009 at 5:28 PM. Reason : delete doesn't work, and neither does the reply/compose buttons but those should be fairly easy]

[Edited on August 1, 2009 at 5:29 PM. Reason : oh, and neither does the GO button on the single PM view]

8/1/2009 5:27:18 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

i'll someone else put that in with the other code and post a link to one file

8/1/2009 5:33:01 PM

BigMan157
no u
103352 Posts
user info
edit post

k

http://bigman.x10hosting.com/better_wolf_web.user.js

that's my code added to frosh's

fixed a few things in my code so that the go button works and so does the reply, compose, etc.

delete still doesn't work, but fuck it i never use that anyway

also, you can click in the darkened area around the popup to close it

you'll know it's loaded when 'inbox' says 'superbox'

[Edited on August 1, 2009 at 8:40 PM. Reason : and i just updated it again]

8/1/2009 8:34:48 PM

ScHpEnXeL
Suspended
32613 Posts
user info
edit post

pretty cool man

8/1/2009 10:42:11 PM

HaLo
All American
14089 Posts
user info
edit post

Quote :
"I could do it, but it'd require replacing the scripts attached to each button, and I don't want to do that."


actually it won't require that. i've hacked it together below:



can someone who knows what they're doing in greasemonkey add this into the codebase. this block needs to replace the entire script section that is loaded with the reply, new topic, or edit post pages. This will insert the button that is clicked at the current cursor location.


<script language="javascript">

// Original Example Author: Diego Perini <dperini@nwbox.com>
// Hacked into crazycode by: Ryan Smith <HaLo>
var sb = new Array(
'leftbox', 'rightbox', 'scrollLeft', 'scrollRight',
'caretPos', 'maxLength', 'textLength', 'availLength',
'beforeCaret', 'afterCaret', 'selectedText'
)

for (var i in sb) eval('var ' + sb[i] + ' = {}')

var os = 0
var oe = 0
function updateLeft(o) {
var t = o.value, s = getSelectionStart(o), e = getSelectionEnd(o)
os = s
oe = e
return s
}

function setup() {
for (var i in sb) eval(sb[i] + ' = document.getElementById(sb[i])')
update(document.getElementById('textbox'))
}

function getSelectionStart(o) {
if (o.createTextRange) {
var r = document.selection.createRange().duplicate()
r.moveEnd('character', o.value.length)
if (r.text == '') return o.value.length
return o.value.lastIndexOf(r.text)
} else return o.selectionStart
}

function getSelectionEnd(o) {
if (o.createTextRange) {
var r = document.selection.createRange().duplicate()
r.moveStart('character', -o.value.length)
return r.text.length
} else return o.selectionEnd
}


function Left(str, n){
if (n <= 0)
return "";
else if (n > String(str).length)
return str;
else
return String(str).substring(0,n);
}
function Right(str, n){
if (n <= 0)
return "";
else if (n > String(str).length)
return str;
else {
var iLen = String(str).length;
return String(str).substring(iLen, iLen - n);
}
}


function addtext (text) {
e = document.forms['__aspnetForm']._ctl0_body.value
endLength = e.length - updateLeft(document.forms['__aspnetForm']._ctl0_body)
document.forms['__aspnetForm']._ctl0_body.value = Left(document.forms['__aspnetForm']._ctl0_body.value,(updateLeft(document.forms['__aspnetForm']._ctl0_body))) + text + Right(document.forms['__aspnetForm']._ctl0_body.value,endLength);
document.forms['__aspnetForm']._ctl0_body.focus();
}

function shortenURL (url)
{
if(url!=null)
{
twwDomain1 = "http://www.thewolfweb.com/";
twwDomain2 = "http://thewolfweb.com/";
brentDomain1 = "http://www.brentroad.com/";
brentDomain2 = "http://brentroad.com/";

if(url.toLowerCase().indexOf("http://") != 0 && url.toLowerCase().indexOf("https://") != 0)
url = "http://" + url;

if(url.toLowerCase().indexOf(twwDomain1) == 0 && url.length > twwDomain1.length)
url=url.slice(twwDomain1.length);
else if(url.toLowerCase().indexOf(twwDomain2) == 0 && url.length > twwDomain2.length)
url=url.slice(twwDomain2.length);
else if(url.toLowerCase().indexOf(brentDomain1) == 0 && url.length > brentDomain1.length)
url=url.slice(brentDomain1.length);
else if(url.toLowerCase().indexOf(brentDomain2) == 0 && url.length > brentDomain2.length)
url=url.slice(brentDomain2.length);
}
return url;
}

</script>


[Edited on August 3, 2009 at 1:13 AM. Reason : quote]

[Edited on August 3, 2009 at 1:24 AM. Reason : replace instead of update]

8/3/2009 1:10:59 AM

wawebste
All American
19599 Posts
user info
edit post

this is very nice

I'm gonna try and work on this sometime but want to post it so I don't forget...

With the new "send pm" link on the userinfo thing on posts....can it be used to launch directly with bigman's thing to pop up to the proper person, shouldn't be too hard to implement. I really wanna try and do it but anyone else feel free.

[Edited on August 3, 2009 at 2:42 AM. Reason : .]

8/3/2009 2:38:20 AM

FroshKiller
All American
51880 Posts
user info
edit post

I won't be using or supporting his code at this point.

Pop-up composition is actually not in the cards right now. All of the major form submissions--PM composition, posting a new topic, and replying to a thread--submit a hidden input that contains encrypted information about the current session. I can't spoof it, and I can't get a valid one without doing a lot of bullshit I'm not interested in doing.

I like that you guys want to add to it, and that is the idea, but I want to warn you that I'm making some big changes in the next couple of releases that will probably break whatever you've come up with.

[Edited on August 3, 2009 at 6:11 AM. Reason : ...]

8/3/2009 6:10:24 AM

 Message Boards » Feedback Forum » Request features for a TWW Greasemonkey script Page 1 [2] 3 4 5 6 7 8, Prev Next  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.