Why not just throw on the already created class for this in your HTML? The class is: post-gm-only
That is what OP uses on the GM Only sections that is already coded to be able to hide that unless your GM. I don't think that can be accomplished through CSS alone (pretty sure it requires at least some JS which we can't use) so I don't think you'll have much of an option on it.
--
Alex
"Dragon Age: Requiem":https://da-requiem.obsidianportal.com/
Ahh, gotcha. It isn't in the post... it's an already existing outside element.... just something I don't want the players messing with, so I thought I could hide it from them ;-)
Ahh, morbidly curious, what element was it that you were considering hiding. I mean, I might be able to come up with something, just not super confident on it :)
Then simply place the button again in your own HTML somewhere and just add on the post-gm-only Class to that so that only you as the GM can see it. If you have a Adventure Log Index post (like I have on my DA:R page) that would probably become the best place to post it. Just toss it in as such on that page:
@Create a New Post@
If you want to be even more efficient on preventing your players from posting Adventure Logs so easily (they would still be able to do so by manually entering the right address in the address bar) you should also add this to your CSS (should remove the link for Adventure Log under the "New" menu on the top bar of the site if I set it up correctly):
.dropdown > li:first-child {
visibility:hidden;
}
All of this should help you get things setup closer to what you're intending I think. I forget how your logs are setup, but if you still have them set in a way where the preview of the content is still visible then keeping the button code close to the start of the Log Index Post should make it visible on the main Adventure Logs page as well. Hope this helps.
--
Alex
"Dragon Age: Requiem":https://da-requiem.obsidianportal.com/
JSYK, the Body element of the page has the class 'campaign-game-master' in it if you are the GM. Thus, you could hide the button only for non-GMs purely using CSS, something like:
Comments
Just trying to help out.
I have a certain CSS element, say.... .icon-edit, that I want to hide unless the user is a GM... any ideas?
-bort
Campaign of the Year - 2018
That is what OP uses on the GM Only sections that is already coded to be able to hide that unless your GM. I don't think that can be accomplished through CSS alone (pretty sure it requires at least some JS which we can't use) so I don't think you'll have much of an option on it.
--
Alex
"Dragon Age: Requiem":https://da-requiem.obsidianportal.com/
-bort
Campaign of the Year - 2018
-bort
Campaign of the Year - 2018
.adventure-log-new-container .button .adv-new {
display:none;
}
Then simply place the button again in your own HTML somewhere and just add on the post-gm-only Class to that so that only you as the GM can see it. If you have a Adventure Log Index post (like I have on my DA:R page) that would probably become the best place to post it. Just toss it in as such on that page:
@Create a New Post@
If you want to be even more efficient on preventing your players from posting Adventure Logs so easily (they would still be able to do so by manually entering the right address in the address bar) you should also add this to your CSS (should remove the link for Adventure Log under the "New" menu on the top bar of the site if I set it up correctly):
.dropdown > li:first-child {
visibility:hidden;
}
All of this should help you get things setup closer to what you're intending I think. I forget how your logs are setup, but if you still have them set in a way where the preview of the content is still visible then keeping the button code close to the start of the Log Index Post should make it visible on the main Adventure Logs page as well. Hope this helps.
--
Alex
"Dragon Age: Requiem":https://da-requiem.obsidianportal.com/
-bort
Campaign of the Year - 2018
body:not(.campaign-game-master) .adventure-log-new-container .button .adv-new {
display:none;
}
-bort
"Morwindl":https://morwindl.obsidianportal.com
"EIDL":https://eidl.obsidianportal.com
Campaign of the Year - 2018