Comm. Code

Uitleger's picture


Lockscreen
<style onload="if ((document.referrer.indexOf('???')==-1)&&(location.href.indexOf('comment')==-1)){document.querySelector('body').style.overflow='hidden'; var get=document.createElement('DIV'); get.innerHTML=lock.innerHTML; lock.parentNode.removeChild(lock); get.id='lock'; document.documentElement.appendChild(get); lock.style.display='flex'}">#lock{background:black; align-items:center; justify-content:center; position:fixed; display:none; top:0; bottom:0; left:0; right:0; z-index:777}.main{color:#d4ceb4; text-align: center}.lnk{cursor:pointer; margin: 0px 7px}.lnk:hover{text-decoration: underline}.lnk{color: #8dcb22}.lnk:hover{color: white}</style>
<div id="lock"><div class="main"> You looking at this.
<a href="/community/tracker">Redirect</a><span class="lnk" onclick="document.querySelector('body').removeAttribute('style'); lock.style.display='none'">Forward</span></div></div>

How to:
Copy & paste before the rest of your code;
Put your node number as you see it in the address bar [e.g.] in place of the ???;
Put your info inside the main div;
Tweak/re-/move the links as you see fit;
Style the content via the .main{} rule and the Forward link via the .lnk{}/.lnk:hover{} rules;
[ copy your a:link and a:hover properties into the .lnk{} and .lnk:hover{} for best effect ]

This is not a remake of GMS's clickwrap,
so feel free to credit me;

Post your questions/suggestions here.

Features:
This lock div
doesn't pop out when you reply/edit/browse through comment pages;
does not inherit the main blog's effects [ opacity, text color, etc.]


<style onload="if((document.referrer.indexOf('???')==-1)&&(location.href.indexOf('comment')==-1)){document.querySelector('body').style.overflow='hidden';lock.style.display='flex'}">#lock{background:black; align-items:center; justify-content:center; position:fixed; display:none; top:0; bottom:0; left:0; right:0; z-index:777}.main{color:#d4ceb4; text-align: center}.lnk{cursor:pointer; margin: 0px 7px}.lnk:hover{text-decoration: underline}.lnk{color: #8dcb22}.lnk:hover{color: white}</style>
<div id="lock"><div class="main"> You looking at this.
<a href="/community/tracker">Redirect</a><span class="lnk" onclick="document.querySelector('body').removeAttribute('style'); lock.style.display='none'">Forward</span></div></div>

^The lite version.
Pros: got no issue being loaded.
Cons: won't mesh with non-opaque blogs, 'cause it inherits your blog's opacity setting. /Fine with semi-transparent boxes, however/



Dropbox link conversion







About:
From download to direct url format.
Use it for your custom font needs [as seen below], etc.




Font embed

<style> @font-face{ font-family:'NAME YOUR FONT ANYTHING'; src: url('https://dl.dropboxusercontent.com/s/.../yourfontfile.otf') format('opentype'), url('https://dl.dropboxusercontent.com/s/.../yourfontfile.woff2') format('woff2'), url('https://dl.dropboxusercontent.com/s/.../yourfontfile.woff') format('woff'), url('https://dl.dropboxusercontent.com/s/.../yourfontfile.ttf') format('truetype')} body{ font-family:'YOUR FONT NAME'}</style>


About:
Use the url - format pair(-s) matching your file type, remove the rest.


Hidden scrolls.
Leotie's picture

sits ass down

sits ass down
Qanat's picture

tysm bless

tysm bless
Aivilo's picture

Tracking for later

Tracking for later
SoliloquyChryseis's picture

boop

boop

Thank you so freaking much.

Thank you so freaking much. <3
Account previously Mjrn, returned to Veedeer.
Keepiru's picture

.

.

By any chance, would you know

By any chance, would you know how to keep the BG of the main blog from bleeding into the warning page? I've tried looking through other's redirect codes and I can't seem to figure out how to do it.
Account previously Mjrn, returned to Veedeer.
Uitleger's picture

Cheers, folks/ Mjrn, That

Cheers, folks/

Mjrn,
That was your blog's opacity setting. Updated the thing, now check it out.

Hell yeah, exactly what I was

Hell yeah, exactly what I was looking for. Had a feeling that's what it was. Many thanks again for coming to my rescue.
Account previously Mjrn, returned to Veedeer.
Uitleger's picture

You gave me the motive to

You gave me the motive to improve it, so thanks right back at ya.
I may give it one final optimization, but the code I have up now should work fine. Alert me if there are any bugs though.

Only "bug" I've noticed so

Only "bug" I've noticed so far (and it could be something on my end I literally don't know if it's on my end or not), but sometimes the text and links don't load and I just get a blank black page.
Account previously Mjrn, returned to Veedeer.
Uitleger's picture

Interesting. I have the code

Interesting. I have the code running on my own blog, check if the bug shows up there for you.

No it doesn't...I think it's

No it doesn't...I think it's just an issue with my brower tbh. Once I finally get the bio completely sorted up and posted, I'll see if anyone has trouble. If they do, I'll let ya know.
Account previously Mjrn, returned to Veedeer.

Okay, so ran into another

Okay, so ran into another issue, and I definitely feel this one's more code related than browser related. For whatever reason, if I click a tab that I have to scroll down to read all the way (I don't use scrolls on my blog), it will not scroll if that disclaimer code is in place. It's like it's literally stuck in place. I removed the code and was able to scroll and navigate the page just fine.
Account previously Mjrn, returned to Veedeer.
Uitleger's picture

Yeah, I know that one. Simply

Yeah, I know that one. Simply copy/paste the current thing I've got. The one you're using now was a screwup from the other night.

Oops, my b. Thank you for

Oops, my b. Thank you for fixing it. <3
Account previously Mjrn, returned to Veedeer.
Uitleger's picture

Revised & updated.

Revised & updated.

Thank you so much again for

Thank you so much again for this. <3
Uitleger's picture

Anyday, Luna.

Anyday, Luna.
Hautakumpu's picture

May I ask what is the 'otf'

May I ask what is the 'otf' file? and where i could find it?
Icon © Sluggs
Uitleger's picture

You only use the line that

You only use the line that matches the file type you downloaded.
So, for your woff file it's gonna look like this
<style>@font-face{ font-family:'Cane'; src:url('https://dl.dropboxusercontent.com/s/ad447owtdum590p/kgcandycanestripe-webfont.woff') format('woff')} #test{ font-family:'Cane'; color:#b30600; font-size:10px}</style><span id="test">test</span>

test

And if your file ends with .ttf, you use the <style>@font-face{ font-family:'Cane'; src:url('https://dl.dropboxusercontent.com/s/ad447owtdum590p/kgcandycanestripe-webfont.ttf') format('truetype')} #test{ font-family:'Cane'; color:#b30600; font-size:10px}</style><span id="test">test</span>
, etc.

Just use the conversion above to turn your regular dropbox link into dropboxusercontent link.

Heh, ninja'd. Gj!
TavraWolfe's picture

tysm

tysm <3
by VasilisaKonti <3


Hautakumpu's picture

yee, i figured it out, also i

yee, i figured it out, also i forgot to add the ' http:// ' at the start so i quess that caused the not working, pff. But thank you very much!
Icon © Sluggs
Uitleger's picture

TavraWolfe,

TavraWolfe, Hautakumpu,
You're welcome.

is there a way to rename

is there a way to rename "edit" and "reply" button links in the blog?
Uitleger's picture

Sure,

Sure, here:

<style>.comment_reply a{font-size: 0px;display: inline-flex}.comment_reply a:before{font-size: 12px;content: "Macarena"}.comment_edit a{font-size: 0px;display: inline-flex}.comment_edit a:before{font-size: 12px;content: "Ehh"}</style>

thanks for sharing!

thanks for sharing!
Hautakumpu's picture

Juust asking if there is any

Juust asking if there is any help/code for the comment section where your comments are scrolling like horizontal way? I remember that you had something like that on your old blog.
Ofc if it's your personal code you use, then i won't ask a help for it, but i really liked the idea.
Icon © Sluggs
Uitleger's picture

The css is personal, since I

The css is personal, since I wrote it from the ground-up, but I don't mind seeing the concept itself anywhere else. And if you don't mind crediting my work, then I can just insert it into a layout for you.
Hautakumpu's picture

Yes ofc full credits will be

Yes ofc full credits will be given! (:
Icon © Sluggs
Uitleger's picture

Alright, pastebin your code

Alright, pastebin your code and link it here.
Hautakumpu's picture

Code Here

Code Here
Icon © Sluggs
Uitleger's picture

Here you go. Contact me if

Here you go. Sticking out tongue
Contact me if you'll need further help with it.
Hautakumpu's picture

Thank you very much!

Thank you very much! Smiling
Icon © Sluggs