-
-
Save douglas-johnson/aa7992550591896ec0c78615dea60341 to your computer and use it in GitHub Desktop.
Stylesheet for okayplayer message board and a bookmarklet to apply it using a desktop browser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(( d, w, url ) => { const p = new URLSearchParams(w.location.search); if ( p.has('topic_id') ) {d.body.classList.add('okp-topic');} else if ( p.has( 'forum' ) ) {d.body.classList.add('okp-forum');} fetch( url ) .then( ( r ) => { return r.text(); } ).then( ( css ) => { const style = d.createElement( 'style' ); style.type = 'text/css'; style.appendChild( d.createTextNode(css) ); d.head.appendChild( style ); });})(document, window, 'https://gist.githubusercontent.com/douglas-johnson/aa7992550591896ec0c78615dea60341/raw/okayplayer-stylesheet.css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Reset | |
*/ | |
* { | |
box-sizing: border-box; | |
} | |
html { | |
font-size: 100%; | |
} | |
body { | |
font-size: 100%; | |
line-height: 1.5; | |
} | |
#network-bar .sup_header { | |
inline-size: auto; | |
block-size: auto; | |
} | |
table { | |
line-height: inherit; | |
} | |
table:not(.dctoc), | |
table:not(.dctoc) :is(thead,tbody,tfoot,tr,td,th) { | |
display: block; | |
padding: 0; | |
inline-size: auto; | |
} | |
table,thead,tbody,tfoot,tr,td,th { | |
font-size: inherit; | |
} | |
br { | |
display: none; | |
} | |
[align=center] { | |
text-align: inherit; | |
} | |
[nowrap=nowrap] { | |
white-space: inherit; | |
} | |
.dcheading, .dclite, .dcdark, .dcdate, .dclink, .dcauthorlink, .dcmisc, .dccaption, .dcauthorinfo, .dcpagelink, .dcsortby, .dcmenu, .dcsubjecttitle, .dcnavmenu, .dctoc, .dctocsubject, .dctocmisc | |
{ | |
font-size: inherit; | |
} | |
.dcborder { | |
background-color: inherit; | |
} | |
.dcborder ~ .dcborder { | |
margin-block-start: 1em; | |
} | |
body > .dcborder > tbody, | |
body > table:not(.dcborder) .dcborder > tbody{ | |
padding-inline-start: 1em; | |
padding-inline-end: 1em; | |
} | |
/** | |
* Forum | |
*/ | |
.okp-forum tr:is( .dclite, .dcdark ) { | |
display: flex; | |
flex-wrap: wrap; | |
gap: 0.5em; | |
padding: 0.5em; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(1) { | |
order: 2; | |
flex-basis: 18px; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(2) { | |
order: 1; | |
flex-basis: 100%; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(3) { | |
order: 3; | |
flex-basis: calc( 100% - 18px - 0.5em ); | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(3) ~ td { | |
font-size: 0.875em; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(4) { | |
order: 4; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(5) { | |
order: 5; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(5)::before { | |
background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2220px%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2220px%22%20fill%3D%22%23000000%22%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M20%202H4c-1.1%200-2%20.9-2%202v18l4-4h14c1.1%200%202-.9%202-2V4c0-1.1-.9-2-2-2z%22%2F%3E%3C%2Fsvg%3E'); | |
inline-size: 1em; | |
display: inline-block; | |
content: ""; | |
block-size: 1em; | |
vertical-align: middle; | |
background-size: cover; | |
margin-inline-end: 0.5em; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td > div { | |
display: inline; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(6) { | |
order: 6; | |
} | |
.okp-forum tr:is( .dclite, .dcdark ) > td:nth-of-type(6)::before { | |
background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224%22%20fill%3D%22%23000000%22%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M12%204.5C7%204.5%202.73%207.61%201%2012c1.73%204.39%206%207.5%2011%207.5s9.27-3.11%2011-7.5c-1.73-4.39-6-7.5-11-7.5zM12%2017c-2.76%200-5-2.24-5-5s2.24-5%205-5%205%202.24%205%205-2.24%205-5%205zm0-8c-1.66%200-3%201.34-3%203s1.34%203%203%203%203-1.34%203-3-1.34-3-3-3z%22%2F%3E%3C%2Fsvg%3E'); | |
inline-size: 1.5em; | |
display: inline-block; | |
content: ""; | |
block-size: 1em; | |
background-size: 100% 125%; | |
margin-inline-end: 0.25em; | |
} | |
/** | |
* Topic | |
*/ | |
.okp-topic {} | |
table.dctoc :is(table,thead,tbody,tfoot,tr,td,th) { | |
display: revert; | |
} | |
table.dctoc table { | |
inline-size: 100%; | |
} | |
.dctocmisc { | |
white-space: nowrap; | |
} | |
/** | |
* Message | |
*/ | |
.dcmessage br { | |
display: inline; | |
} | |
/** | |
* Page Link | |
*/ | |
tr.dcpagelink { | |
display: flex; | |
flex-wrap: wrap; | |
gap: 1em; | |
justify-content: space-between; | |
} | |
td.dcpagelink{ | |
inline-size: auto; | |
text-align: end; | |
flex-grow: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment