Forums

Personal user blocklist extension for Chrome

Personal user blocklist extension for Chrome

I have developed and published a Chrome Extension for hiding posts from users on the Tesla forum. Search the chrome webstore with the text "tesla forum personal blocklist" to add the extension. (system would not allow me to post a direct link to the extension)

To use:
Highlight the desired username on the post to select it
Right click
Click on "Hide posts from user"

The posts from the user should be hidden immediately and automatically for future sessions.
Your personal blocklist should sync across chrome sessions if you are signed in on multiple machines.
To view or clear block list use the options screen for the extension page.

Keep the peace, do not feed the trolls.

*****Update 9/13/2016*****
V 1.0.3 published.

Extension has been renamed to Tesla Forum Enhancement Suite to better describe its functionality.
Search feature styling has been updated to match the rest of the Tesla Forum style and 1st post and comment links added.
Thanks to JeffreyR for his continued contributions to this project.

Mike83 | 20 augustus 2016

Interesting. How do we know it is safe to use?

bdrathburn | 20 augustus 2016

When you install the extension it will specify which domains the extension is allowed to interact with. The only domain is forums.tesla.com so any potential damage is fairly limited.

Also the code is on Github, search for the repository named teslaforumpersonalblocklist.

You are welcome to review the code before installing the extension, or you can build it into an extension yourself and install it in developer mode to avoid going through the chrome web store.

bdrathburn | 20 augustus 2016

Forgot to mention. This was a "quick and dirty" project so the code may not be super clean and efficient but it should be easy enough to follow.

Blue85DCalifornia | 20 augustus 2016

gitub.com: "We couldn’t find any code matching 'teslaforumpersonalblocklist'"

bdrathburn | 20 augustus 2016

https:// github .com/bdrathburn/TeslaForumPersonalBlocklist

vperl | 20 augustus 2016

Those that use unvetted code on their systems are .... ( cannot use proper word).

Best to all.

JeffreyR | 20 augustus 2016

@vperl you can build it from source yourself from GitHub. So you can verify what it does.

I was thinking of building this myself, so I'll take a look and report back.

@OP did you see my bookmarklet that does this (sort of)?

bdrathburn | 21 augustus 2016

@vperl as Jeffery said you can build/vett it yourself from github. What exactly do you consider vetted code in this case?

@JefferyR yes I have run across your thread, cant seem to find it right now though.It looked promising but i was looking to build a more streamlined and seamless experience to the user. I think the bookmarklets had to be enabled manually by the user each time or something like that. Plus i had been looking for an excuse to start writing chrome extensions, this seemed like a good place to start.

As for testing this out it is very easy to install extensions from source, the files are ready to go. All you need to do is make sure you have the chrome://extensions page open in your browser, make sure developer mode option is checked, download the source files to a directory on your computer, drag/drop that entire directory(not the individual files) to the extensions page.

JeffreyR | 21 augustus 2016

@bdrathburn I agree 100%. My plan was to take what I had learned from the bookmarklets and create an extension. @Red Sage gave me a gental nudge too ;^)

See my Tips & Tricks for a few examples.

JeffreyR | 21 augustus 2016

@OP +1 Very cool stuff. I am going to extend the styles a bit and incorporate some of my stuff. I'll let you know if I am successful.

Folks,
This extension is written in JavaScript and HTML, so you can download it from GitHub and make sure it is not doing anything you would not want it to. I have not installed it yet, but will do so momentarily. I just wanted to get the ball rolling.

JeffreyR | 21 augustus 2016

I added this enclosure to your content.js:

(function (){ var newcss = '.pre { background: #f9f9f9; white-space: pre} blockquote { background: #f9f9f9; border-left: 10px solid #ccc; margin: 1.5em 10px; padding: 0.5em 10px; quotes: initial; } blockquote:before { color: #ccc; content: open-quote; font-size: 4em; line-height: 0.1em; margin-right: 0.25em; vertical-align: -0.4em; } blockquote p { display: inline; }'; if ('\v'=='v') /* ie only */ { document.createStyleSheet().cssText = newcss; } else { var tag = document.createElement('style'); tag.type = 'text/css'; document.getElementsByTagName('head')[0].appendChild(tag); tag[ (typeof document.body.style.WebkitAppearance=='string') /* webkit only */ ? 'innerText' : 'innerHTML'] = newcss; } })();

You can PM me over at TMC if you are interested in it (and if it does not come through Mollom's filters).

JeffreyR | 21 augustus 2016

Looks like it came through okay. This adds my CSS tricks to your hide tricks. Next addition to your extension is my SPAM Blocker for hiding Original Posts from Main Sections.

BTW - I am running the code in Developer Mode, and it works great.

bdrathburn | 21 augustus 2016

@JeffreyR thanks, glad you like it. Let me know if you have any questions. I included a stylesheet because I was originally going to change the style of the offending posts but just ended up hiding them entirely so the stylesheet should be empty.

bdrathburn | 21 augustus 2016

Cool, looking over the code. Appreciate the feedback.

JeffreyR | 21 augustus 2016

Code is from my re-styling bookmarklets. It adds a style to Blockquote tags and adds a new "pre" class for enabling preformatted text. You can see them in action here:

https://forums.tesla.com/forum/forums/easy-way-style-blockquotes#comment...

You'll notice that the screenshots don't quite match as Chrome Extensions seem to escape the quote tag character codes. But I switched it use "initial" in my extension, so at least something shows up.

JeffreyR | 21 augustus 2016

It may make more sense to use my code in your style sheet. Right now it's in one big string which as you can tell is VERY ugly.

JeffreyR | 21 augustus 2016

Here is my extension for hiding "Spam" from the OP Main Sections:

(function (){
var t=document.getElementsByTagName('table')[0];
if(t == null) { return; }

chrome.storage.sync.get('blockedUserNames', function(result){
var storedValues = result.blockedUserNames;

for(var i=0,r;r=t.rows[i];i++){
for(var j=0,c;c=r.cells[j];j++){
for (var v = 0, ll = storedValues.length; v < ll; v++) {
if(c.innerHTML.indexOf(storedValues[v])!=-1){r.style.display='none';}
}
}
}
});
})();

One possible refinement would be to re-stripe the table, since you will see that once you "hide" the offending post topic, the table striping is not correct any more.

JeffreyR | 21 augustus 2016

Now you know why I want the "pre" class!

bdrathburn | 21 augustus 2016

I think those would be great additions. I sent you a pm on TMS with my email address, shoot me an email and we can hammer out the details.

bdrathburn | 21 augustus 2016

TMC*

JeffreyR | 21 augustus 2016

Sounds good. I'm not at my desk right now. I'll ping you tonight. We can post what I'm using for now, and refactor to make it a bit better after.

JeffreyR | 21 augustus 2016

@bdrathburn I did not see your convo w/ me on TMC. I'm JeffreyR there too:

dansplans | 21 augustus 2016

A simple question.

Using this extension would eliminate a poster from your forum experience, other than when others reference or quote their posts?

Red Sage ca us | 22 augustus 2016

Cool.

bdrathburn | 23 augustus 2016

@dansplans yes this extension hides posts made by the user but any text quoted in another users posts would be left alone. Is this a feature that you think would be useful? Might be able to add this into the next release.

bdrathburn | 23 augustus 2016

Also if anyone tries the extension and likes it please rate it in the chrome store or post on this forum.

dansplans | 23 augustus 2016

thanks. I may try it out

JeffreyR | 31 augustus 2016

Brian, sent you an email. Let me know what you'd like to do next.

PBEndo | 2 september 2016

Will the extension hide an entire thread started by the blocked user or only comments within a thread?

PBEndo | 2 september 2016

I tried it and it works well - thanks for doing this!
To answer my previous question, it will not remove an entire thread or the OP created by the blocked user, but it works perfectly on the comments.

Silver2K | 4 september 2016

Bump

JeffreyR | 4 september 2016

New version incorporates my Spam Blocker bookmarklet and blocks OP's by blocked user. @OP re-styles rows, so it's better than my Spam Blocker bookmarklet.
BTW - Everyone should add "+91" to their blocked list. We get a lot of spam w/ that in it.

JeffreyR | 4 september 2016

It also improves your Stylesheet w/ my Blockquote and Preformatted Text tricks

bdrathburn | 6 september 2016

@PBEndo thanks for the feedback.

Just pushed out an update a few days ago based on a collaboration with JeffreyR which includes the ability to block the entire thread started by a user on your blocklist.

Ross1 | 6 september 2016

If anyone is ignoring me please let me know, ROFL.

Silver2K | 6 september 2016

JeffreyR

I like Edge.. working on anything?

KP in NPT | 6 september 2016

I would love it if I could use something like this on Safari. Anyone know?

JeffreyR | 6 september 2016

Send me any examples or how-tos and I'll do something for you. Remember my bookmarklets should work on any browser.

https://forums.tesla.com/forum/forums/tips-tricks-using-and-searching-fo...

They are not as cool as this solution though. For those using other web browsers, remember that Chrome will run on Windows 10 and MacOS. Some forum users may be worth it.

dansplans | 7 september 2016

This extension is amazing. It's like having a migraine for a month straight......and then it is magically gone!

JeffreyR | 7 september 2016

Gone daddy gone. Your love is gone.

Glad you like it. @bdr gets all the credit. We just added my stuff after he got this going.

Silver2K | 7 september 2016

I'm not a fan of Chrome, but i will use it for Tesla forums. this extension works great!! thank you

also as a request, please work on a similar extension for Edge.

thanks again!

JeffreyR | 7 september 2016

Looks like Edge supports Extensions too. I'll have to see what they require. If they are like Chrome's it won't be hard at all.

Silver2K | 7 september 2016

Edge has supported extensions since the release of the second version of windows 10 in July

bdrathburn | 7 september 2016

@Silver yes they added support but are not accepting public submissions at this point. This is the text from their FAQ
"For the Windows 10 Anniversary Update, we are intentionally starting with a small set of extensions. The list of extensions is locked - you can see the list at our extensions page REMOVED. We want to be mindful about what extensions are available on the platform and watch for telemetry and feedback and make sure the reliability, performance and functionality of the browser isn’t impacted by these new features. Extension developers can submit a request to REMOVED to be considered for a future update."

I have ported the extension to run on edge and submitted a request to have the extension approved for release but i have no idea how long that will take.

In the meantime if you would like instructions for installing the extension manually i can provide that.

-B

Silver2K | 7 september 2016

I would love the manual instructions.

thank you

bdrathburn | 7 september 2016

The ported files are up on github, you will need to download them from here.
https://github
com/bdrathburn/TeslaForumPersonalBlocklist_Edge

and follow the instructions here for manual installation

https://developer.microsoft
com/en-us/microsoft-edge/platform/documentation/extensions/guides/adding-and-removing-extensions/

Let me know if you run into any issues.

Silver2K | 7 september 2016

will do thank you!

bdrathburn | 7 september 2016

@mp1156 it looks like Apple no longer provides a version of Safari that runs on windows. I don't have any mac machines so I will not be able to port the extension over.

Silver2K | 7 september 2016

blocked the whole forum :)

Pages