Skip to content

Instantly share code, notes, and snippets.

Jon Robson jdlrobson

Block or report user

Report or block jdlrobson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View i18n.diff
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 066c60d..e5ab8c0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -23,7 +23,7 @@
"Umherirrender",
"Wellwisher",
"Yekrats",
- "아라"
+ "\uc544\ub77c"
@jdlrobson
jdlrobson / gist:11193328
Last active Aug 29, 2015
Duplicate css rules in MobileFrontend
View gist:11193328
{.client-js #page-secondary-actions button,.client-js #page-secondary-actions .button} AND {.skin-vector #page-secondary-actions .button.nearby} share 10 rules
- -moz-box-sizing: border-box
- -o-background-size: 30px auto
- -webkit-background-size: 30px auto
- -webkit-box-sizing: border-box
- background-position: center center
- background-repeat: no-repeat
- background-size: 30px auto
- box-sizing: border-box
- text-indent: -9999px
@jdlrobson
jdlrobson / Resources.php
Last active Aug 29, 2015
A boiler plate for a map extension
View Resources.php
<?php
/**
* A boilerplate for resource loader modules
*/
$wgMFResourceBoilerplate = array(
'localBasePath' => __DIR__,
'remoteExtPath' => 'WikiMaps',
);
$modules = array(
View resources
'mobile.editor.ws' => $wgMFMobileResourceBoilerplate + array(
'dependencies' => array(
'mobile.editor',
),
'scripts' => array(
'javascripts/modules/editor/ws.js',
),
),
@jdlrobson
jdlrobson / VisualEditor.php.diff
Created May 23, 2014
VisualEditor use existing references
View VisualEditor.php.diff
diff --git a/VisualEditor.php b/VisualEditor.php
index ab37eb8..38452f9 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -413,7 +413,6 @@ $wgResourceModules += array(
'lib/ve/modules/ve/ui/ve.ui.js',
'lib/ve/modules/ve/ui/ve.ui.Surface.js',
- 'lib/ve/modules/ve/ui/ve.ui.DesktopSurface.js',
'lib/ve/modules/ve/ui/ve.ui.Context.js',
View gist:a05ddad00175ebceac68
diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index 9ef7f7b..a5e944e 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -97,11 +97,11 @@
if ( M.isIos && this.hasFixedHeader ) {
$overlayContent
.on( 'touchstart', function ( ev ) {
- startY = ev.originalEvent.touches[0].pageY;
+ startY = ev.originalEvent.touches[ 0 ].pageY;
View gist:7af95ce2c09e49634c23
( function ( M, $ ) {
var api = M.require( 'api' ),
Api = api.Api,
WikiDataApi;
/**
* Gets claims and labels from the WikiData API
* @class WikiDataApi
* @extends Api
*/
WikiDataApi = Api.extend( {
@jdlrobson
jdlrobson / gist:eca5ef61261ffd39cf9f
Last active Aug 29, 2015
Populate a list of categories on MobileFrontend - run this in your console
View gist:eca5ef61261ffd39cf9f
function makeStockContent( titles, content ) {
var M = mw.mobileFrontend;
mw.loader.using( 'mobile.editor.api').done( function() {
var EditorApi = M.require( 'modules/editor/EditorApi' );
titles.forEach( function( title ) {
var api = new EditorApi( {
title: title,
isNewPage: true
} );
api.setContent( content );
@jdlrobson
jdlrobson / gist:21b6a2b90baf7f673999
Created Jan 28, 2015
Put this in your .profile and smoke it
View gist:21b6a2b90baf7f673999
function _git_prompt() {
local git_status="`git status -unormal 2>&1`"
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
if [[ "$git_status" =~ nothing\ to\ commit ]]; then
local ansi=42
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
local ansi=43
else
local ansi=45
fi
@jdlrobson
jdlrobson / MediaWiki repository report generator tool.sh
Last active Aug 29, 2015
MediaWiki repository report generator tool.sh
View MediaWiki repository report generator tool.sh
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/core
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AJAXPoll
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/APC
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AWS
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AWSSDK
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AbsenteeLandlord
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AbuseFilter
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AccessControl
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AccountAudit
gerrit.py --report 'summary' --sample_size 1000 --project mediawiki/extensions/AccountInfo
You can’t perform that action at this time.