Skip to content

Instantly share code, notes, and snippets.

View jdlrobson's full-sized avatar

Jon Robson jdlrobson

View GitHub Profile
/* brand */
#siteSub {
font-size: 13px;
padding-bottom: 5px;
color: #333;
&:after {
content: " ";
display: block;
@jdlrobson
jdlrobson / toc.less
Created July 18, 2017 23:34
toc.less
.toc {
page-break-before: always;
page-break-after: always;
font-family: serif;
}
.toc ul {
list-style: none;
}
.toc > ul > li {
.toc {
page-break-before: always;
page-break-after: always;
font-family: serif;
}
.toc ul {
list-style: none;
}
.toc > ul > li {
/*
- Basic infobox styling
- Remove background colors, they are hard to print
*/
.infobox {
border: 1px solid #aaa;
border-spacing: 3px;
background-color: #fff;
weightedBoolean = function ( name, trueWeight, token ) {
return mw.experiments.getBucket( {
enabled: true,
name: name,
buckets: {
'true': trueWeight,
'false': 1 - trueWeight
}
}, token ) === 'true';
@jdlrobson
jdlrobson / T169823.css
Last active September 2, 2017 21:36
T169823.css
/* pint css */
/* This css files can be applied to any wikipedia article.
Note: remove any other css applied to page. this is the only css needed to print.
*/
/*
- Have some padding and body typeface
- Turn color to pure black. good for printing pure black
*/
import json
from collections import OrderedDict
f = open('skin.json', 'r')
skinData = json.load(f, object_pairs_hook=OrderedDict)
f.close()
newModule = {
"class": "MFResourceLoaderParsedMessageModule",
"targets": [ "desktop", "mobile" ],
@jdlrobson
jdlrobson / pixies.py
Last active February 20, 2019 19:35
#!/usr/bin/env python
'''
Copyright [2017] [Jon Robson]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0