Toggle Buttons

TappedOut forum

Posted on Dec. 6, 2013, 12:33 p.m. by nbarry223

Is there any toggle feature currently? For example, you type something like toggle, /toggle (both surrounded by <>, won't let me type it like that, and currently does nothing) around something and it shows up as something that says something like "click to toggle" and when you click on it, it drops down whatever you typed in between.

This can be very helpful in making longer deck descriptions less intimidating, and I feel it would benefit everyone, since you can cover mostly everything anyone would want to know in your description without utterly cluttering it.

gufymike says... #2

That is not a html tag by default, but something implemented in javascript and added to sites manually by the creatures. This site doesn't have that, and that's why it does nothing. As for it being a suggestion I +1 it.

December 6, 2013 1:07 p.m.

gufymike says... #3

creators are creatures too! (typoed that).

December 6, 2013 1:10 p.m.

nbarry223 says... #4

yes, that is exactly what I was doing, suggesting it. I am just unaware if there is currently any feature like it, thus the rambling (if there is, please let me know, but I doubt it).

I mean I can go ahead and script in buttons in my post every time I want to use a feature like that, but that is a lot of unnecessary work (especially trying to make it work with all browsers, limited to only one language, I'd have to write tons of code for a simple button), when it'd be better if the site just had it as a feature.

Thank you for supporting my suggestion.

December 6, 2013 1:13 p.m.

ChiefBell says... #5

deck-large: only-deck-that-lets-you-press-buttonson-firefox/

December 6, 2013 1:33 p.m.

ChiefBell says... #6

I just implemented this code last night. It took me around 2 or 3 hours to do. This site doesn't like javascript very much. It still only works on firefox.

December 6, 2013 1:34 p.m.

gufymike says... #7

The site shouldn't like custom javascript IMO. That's a security hole, specifically for XSS session hijacking fun.

December 6, 2013 1:38 p.m.

ChiefBell says... #8

It's only about 20 lines though - it's not hard. It's just it took me ages to figure out what worked in a deck description and what didn't. I had to go through about 4 different methods. Also, you can't copy and paste it because each of the scripts refers to paragraph id's so you have to change it for each block of text you want to attach attach buttons to.

December 6, 2013 1:42 p.m.

nbarry223 says... #9

Yes, but that is more clunky than I envision it. If I would go about scripting it, I'd make it a single button that you click to hide/show the text (if a button at all). I also would try to make it work for firefox/chrome/ie/and possibly safari. I expect it'd take well over a few hours and end up being a day long project doing it from scratch (at least) unless I was extremely lucky and hit no snags.

December 6, 2013 1:44 p.m.

ChiefBell says... #10

I didn't know it was a security concern. All I wanted to do was implement some of the features seen on mtgsalvation. That way people could do long primers and more inventive articles without scaring people off with text walls. Im sorry if this is bad?.

December 6, 2013 1:46 p.m.

nbarry223 says... #11

Oh trust me, I know that troubleshooting is the most time consuming aspect of anything like this... Something that would take less than half an hour easily turns into over 5 hours if you have enough problems.

That is why I feel the site itself should make the function, because that way the person writing it knows how the site is set up and what they can/cannot do. It is just more efficient.

December 6, 2013 1:47 p.m.

gufymike says... #13

ChiefBell I suggest this, write the code, submit it to github, bug yeaGO! to add into the sites ui/markdown features. Then it's uniformly available for everyone.

December 6, 2013 1:51 p.m.

ChiefBell says... #14

Guys. As far as I know I'm the first person to be trying this and im still troubleshooting it now. I'm not a computer scientist. I have NO IDEA what I'm doing, at all. I'm putting a lot of time into this because I want to make it work - it could be good for the site. I'm sorry that it's not perfect but I am a self professed noob.

December 6, 2013 1:52 p.m.

gufymike says... #16

ChiefBell pretty much how all programmers and web designers start :)

December 6, 2013 1:55 p.m.

nbarry223 says... #17

Sorry if this thread creates any issues, all I wanted was some simple toggles so I can hide the long ass list of prices in


deck chart $10 Deck - Taniwha

SCORE: 31 | 42 COMMENTS | 4518 VIEWS
Commander / EDH* nbarry223 Playtest

but have them there for people's reference in case they were curious. Something similar to the updates with hidden comments would be fine, I'm not picky.

December 6, 2013 2:01 p.m.

ChiefBell says... #18

Im out at the moment but if you comment on my profile to remind me - ill send it to you

December 6, 2013 2:04 p.m.

gufymike says... #19

If people were curious in that case, the site lists the tcgplayer prices for the whole deck, and if you/we click through a card, the prices for that card. I think that's just a bit of work to do. Though nice work on the budget. Joz does something on tumblr for budget edh decks. He may want to see this.

I caught it on mtgcommander.net.

Project Cal

Epochalyptik can you delete the requested posts? #11 and #14

December 6, 2013 2:08 p.m.

Joz says... #20

gufymike thanks for promoting Project: CAL :D

Don't forget to submit decklists here, reddit or at my tumblr :D

(shameless plugging for the glory of EDH players everywhere.)

December 6, 2013 5:06 p.m.

gufymike says... #21

You're welcome Joz.

December 6, 2013 5:37 p.m.

This discussion has been closed