Smart Tripcode Hider.
This commit is contained in:
parent
f1a7f40460
commit
54aa65fa7e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1230,9 +1230,8 @@ if _conf['Compact Post Form Inputs'] then "
|
||||
|
||||
#{
|
||||
if _conf["Tripcode Hider"] then "
|
||||
input.field.tripped:not(:hover):not(:focus) {
|
||||
color: transparent !important;
|
||||
text-shadow: none !important;
|
||||
.tripped:not(:hover):not(:focus) {
|
||||
opacity: 0;
|
||||
}" else ""
|
||||
}
|
||||
|
||||
|
||||
@ -127,6 +127,13 @@ textarea {
|
||||
border: 1px solid #{theme["Input Border"]};
|
||||
color: #{theme["Inputs"]};
|
||||
}
|
||||
#{
|
||||
if _conf["Tripcode Hider"] then "
|
||||
.persona input.field.tripped:not(:hover):not(:focus) {
|
||||
color: #{theme["Input Background"]} !important;
|
||||
text-shadow: none !important;
|
||||
}" else ""
|
||||
}
|
||||
#dump:hover,
|
||||
#qr-filename-container:hover,
|
||||
#qr-filename-container:hover,
|
||||
|
||||
@ -472,6 +472,8 @@ QR =
|
||||
# Load this post's values.
|
||||
for name in ['thread', 'name', 'email', 'sub', 'com']
|
||||
QR.nodes[name].value = @[name] or null
|
||||
|
||||
QR.tripcodeHider.call QR.nodes['name']
|
||||
@showFileData()
|
||||
QR.characterCount()
|
||||
|
||||
@ -883,6 +885,7 @@ QR =
|
||||
# save selected post's data
|
||||
for name in ['name', 'email', 'sub', 'com']
|
||||
$.on nodes[name], 'input', -> QR.selected.save @
|
||||
$.on nodes['name'], 'blur', QR.tripcodeHider
|
||||
$.on nodes.thread, 'change', -> QR.selected.save @
|
||||
|
||||
<% if (type === 'userscript') { %>
|
||||
@ -910,6 +913,11 @@ QR =
|
||||
# Use it to extend the QR's functionalities, or for XTRM RICE.
|
||||
$.event 'QRDialogCreation', null, dialog
|
||||
|
||||
tripcodeHider: ->
|
||||
check = /^.*##?.+/.test @value
|
||||
if check and !@.className.match "\\btripped\\b" then $.addClass @, 'tripped'
|
||||
else if !check and @.className.match "\\btripped\\b" then $.rmClass @, 'tripped'
|
||||
|
||||
submit: (e) ->
|
||||
e?.preventDefault()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user