# Introducing the PPCG Sandbox Viewer™

The sandbox post is really just a question which we use as a system to review posts (which is great and all), but wouldn't it be great if there could be like a dedicated review queue for Sandbox Post? Nobody made one so I took it upon myself to make one! After days and hours of work, I've finished up the viewer!

Well I've got the next best thing, a PPCG Sandbox Viewer!

## Screenshots

You're probably saying show me the damn viewer already so here some screenshots:

Note: The buttons and links all change color depending on the SE site you open it from. This was opened on PPCG w/ the graduation userscript

Here's a GIF demonstrating it's use:

## Features

What does it do? Quite a bit actually:

• See your sandboxed Posts
• See the score breakdown
• See your posts latest activity
• Review posts from the viewer
• Upvote / Downvote posts
• See / Expand posts comment threads
• Leave comments from the sandbox viewer
• The sandbox button lights up when a new sandbox posts is added

Have a feature request? Leave one! I really don't know what else to add

### Installation link for Firefox (GreaseMonkey)

* Don't forget to star :3

This is a userscript, so make sure you have TamperMonkey (Now works on Firefox / GreaseMonkey!) installed and it should prompt you to install it.

## How do I use it?

This adds a little sandbox button to the header.

Click the x in the top-right corner of the viewer to exit it.

• This is amazing, and I love it. – isaacg May 31 '17 at 9:16
• The x is in the top-left... – MD XF Jun 6 '17 at 21:38
• Nice comments in the latest activity bar, guys... – MildlyMilquetoast Nov 16 '17 at 0:45
• Omg, the "you suck" was what I thought reflexively in my head when I saw you click the comment box in the GIF... Then you actually typed it. Oh man, that was good. – Magic Octopus Urn Nov 22 '17 at 19:35
• I added it to Greasy Forge (gist wasn't working in firefox). Here's the link: greasyfork.org/en/scripts/35816-sandbox-viewer – juniorRubyist Nov 29 '17 at 6:01
• Doesn't work with new SE header bar. Will you fix it or is this a dead project? – HyperNeutrino Mar 7 '18 at 1:28
• @HyperNeutrino yes will do – Downgoat Aug 11 '18 at 5:48

# Make it compatible with the new top bar

Since Stack Exchange has changed its top bar across all the sites in the network, one can no longer use the sandbox viewer. Here is how it looks like now:

As you can see the button is no longer there.

* Also you cannot change the settings of the "PPCG Graduation" script) ()

## Feature request: Sandbox Notification

Make the sandbox icon in the super collider show a notification when there's a new sandbox post since the last time you clicked it (much like the reputation icon next to it when you've only received a badge and it turns green... could be a different colour though... sand-coloured maybe).

• [status-completed]: The button should become a bright, sand color when a new post is sandboxed. I haven't tested it but it should work. – Downgoat Feb 17 '16 at 16:16
• @Downgoat Doesn't seem to be working yet. – Martin Ender Feb 17 '16 at 21:00
• Apparently I don't know how websockets work :/ now this should work – Downgoat Feb 18 '16 at 1:03
• @Downgoat Seems to be working now, but I think the change in colour could be a bit more noticeable. – Martin Ender Feb 21 '16 at 16:59
• @MartinEnder How can it be noticeable when you want the color of sand? Maybe the color of white sand? – Erik the Outgolfer Oct 13 '16 at 17:43

## Feature request: enter submits comment

Comments can't contain linefeeds, so like the comment field on SE itself, hitting enter should submit the comment.

• Okay this has been added in 1.6 – Downgoat May 31 '17 at 14:40

## Feature request: make the sidebar work from other SEs

When I open the viewer on another SE, I'm not seeing any challenges in the left sidebar. I'm assuming this is because you're using the user ID on the current SE (this would actually mean I might see someone else's list, if my ID on another SE matches up with theirs on PPCG). If at all possible, it would be neat if the script could determine my ID on PPCG and use that.

• Not sure this is possible but I'll try. – Downgoat Mar 1 '16 at 3:24

# Bug: WebSocket connection blocked when using https

Execution of script 'Sandbox Viewer' failed! Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.


I notice you updated the http: URIs to use https: in the v2.4 commit but the websocket URI on line 351 is still using ws: instead of wss:

• Okay, as of 2.5 (currently 2.6) this has been updated to wss – Downgoat May 31 '17 at 14:40

# Troubleshooting/Error

Does not display any latest activity (I don't have sandboxed posts, at the moment). On latest Chrome/Tampermonkey (OSX, 64-bit).

Also, just realized that upvoting one post locks in the upvote symbol like so:

While you can see that I have not (yet) upvoted that answer.

However, it did work for the one I first clicked on.

• The latest activity is just comments on your posts but I guess that could be changed – Downgoat Feb 17 '16 at 18:51
• Ah ok. I thought it was over all posts. – Michael Klein Feb 17 '16 at 18:51
• The vote thing is weird though I'll fix that – Downgoat Feb 17 '16 at 18:54
• ok, it should be fixed in the latest commit. Let me know if it continues to not work for you – Downgoat Feb 17 '16 at 23:19
• @Downgoat Unfortunately it doesn't process upvotes or downvotes for me now – Michael Klein Feb 18 '16 at 21:41
• :/ Firefox is very stubborn on letting me doing AJAX requests. I've fixed it for Chrome / Safari / etc. But Firefox support is still buggy. – Downgoat Feb 19 '16 at 0:45

# Bug: Voting is cross-site request

When I upvoted, Tampermonkey saw it as a cross-site request and flagged it.

I'm not sure whether this a bug in the script or in SE, but I'll show it anyways:

• It's because the userscript hasn't been updated to point to https://meta.codegolf.stackexchange.com instead of https://codegolf.meta.stackexchange.com (the latter is a redirect tot he former). – Mego May 31 '17 at 13:46
• Okay, I've fixed this as of 2.6 – Downgoat May 31 '17 at 14:40

# Feature Request: Port this to become PPCG Challenge Viewer

I was thinking, this works great with the sandbox, but why not make it into a challenge viewer? I've heard some chit chat about making an app for PPCG, but this would be a good experience for desktop users. Maybe an auto code golf sorter? Any input on this would be great.

# Bug: Post button doesn't work

I just installed this, Chrome/Tampermonkey, and the Post button, for posting comments, doesn't work. It doesn't respond at all.

• This should be fixed now. Error reporting is kinda crappy but hopefully it'll display an alert box if oyur comment is too short – Downgoat May 31 '17 at 14:41