Skip to content

Instantly share code, notes, and snippets.

@karlcow
Created February 10, 2016 07:42
Show Gist options
  • Save karlcow/4e2ca70f20ebfa505b1f to your computer and use it in GitHub Desktop.
Save karlcow/4e2ca70f20ebfa505b1f to your computer and use it in GitHub Desktop.
New-Yorker excerpt for https://webcompat.com/issues/2231
C = function() {
var a,
b,
c,
d,
e,
f,
h,
i,
j,
k,
m,
p,
q,
r,
s;
for (k = '', e = E(x), h = {}, m = 0, q = e.length; q > m; m++) {
for (d = e[m], i = {}, s = d.links, p = 0, r = s.length; r > p; p++) f = s[p],
i[n(f)] = !0,
h[o(f)] = !0;
a = l(d.container);
for (c in i) j = function(a) {
return null == a && (a = ''),
'[' + g + '="' + d.id + '"] [' + w + '="' + c + '"][' + u + ']' + a + ',\n[' + g + '="' + d.id + '"] [' + w + '="' + c + '"][' + y + ']' + a + ':hover'
},
k += '' + j() + ', ' + j(':visited') + ' {\n color: ' + c + ';\n text-decoration: none !important;\n text-shadow: 0.03em 0 ' + a + ', -0.03em 0 ' + a + ', 0 0.03em ' + a + ', 0 -0.03em ' + a + ', 0.06em 0 ' + a + ', -0.06em 0 ' + a + ', 0.09em 0 ' + a + ', -0.09em 0 ' + a + ', 0.12em 0 ' + a + ', -0.12em 0 ' + a + ', 0.15em 0 ' + a + ', -0.15em 0 ' + a + ';\n background-color: transparent;\n background-image: -webkit-linear-gradient(' + a + ', ' + a + '), -webkit-linear-gradient(' + a + ', ' + a + '), -webkit-linear-gradient(' + c + ', ' + c + ');\n background-image: -moz-linear-gradient(' + a + ', ' + a + '), -moz-linear-gradient(' + a + ', ' + a + '), -moz-linear-gradient(' + c + ', ' + c + ');\n background-image: -o-linear-gradient(' + a + ', ' + a + '), -o-linear-gradient(' + a + ', ' + a + '), -o-linear-gradient(' + c + ', ' + c + ');\n background-image: -ms-linear-gradient(' + a + ', ' + a + '), -ms-linear-gradient(' + a + ', ' + a + '), -ms-linear-gradient(' + c + ', ' + c + ');\n background-image: linear-gradient(' + a + ', ' + a + '), linear-gradient(' + a + ', ' + a + '), linear-gradient(' + c + ', ' + c + ');\n -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;\n -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;\n background-size: 0.05em 1px, 0.05em 1px, 1px 1px;\n background-repeat: no-repeat, no-repeat, repeat-x;\n}\n\n' + j('::selection') + ' {\n text-shadow: 0.03em 0 ' + D + ', -0.03em 0 ' + D + ', 0 0.03em ' + D + ', 0 -0.03em ' + D + ', 0.06em 0 ' + D + ', -0.06em 0 ' + D + ', 0.09em 0 ' + D + ', -0.09em 0 ' + D + ', 0.12em 0 ' + D + ', -0.12em 0 ' + D + ', 0.15em 0 ' + D + ', -0.15em 0 ' + D + ';\n background: ' + D + ';\n}\n\n' + j('::-moz-selection') + ' {\n text-shadow: 0.03em 0 ' + D + ', -0.03em 0 ' + D + ', 0 0.03em ' + D + ', 0 -0.03em ' + D + ', 0.06em 0 ' + D + ', -0.06em 0 ' + D + ', 0.09em 0 ' + D + ', -0.09em 0 ' + D + ', 0.12em 0 ' + D + ', -0.12em 0 ' + D + ', 0.15em 0 ' + D + ', -0.15em 0 ' + D + ';\n background: ' + D + ';\n}'
}
for (b in h) k += '[' + v + '="' + b + '"] {\n background-position: 0% ' + b + '%, 100% ' + b + '%, 0% ' + b + '%;\n}';
return F.innerHTML = k
}
@karlcow
Copy link
Author

karlcow commented Feb 10, 2016

The ::moz-selection stuff is on line 26 toward the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment