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
// ==UserScript== | |
// @name Cleanup | |
// @namespace / | |
// @description aasas | |
// @include http://en.wikipedia.org/* | |
// @include http://www.mediawiki.org/wiki/List_of_Problematic_portal_pages_with_two_column_layouts | |
// @version 1 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js | |
// ==/UserScript== |
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
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<ul id="list1"> | |
<li><span>apple</span></li> | |
<li><span>banana</span></li> | |
<li id="last"><span>carrot</span></li> | |
</ul> | |
<script type="text/javascript"> | |
// given a parent |
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
( function( $ ) { | |
$( '<link rel="stylesheet" >' ).attr( 'href', 'http://jonrobson.me.uk/wlm/p.css' ).appendTo( document.head ); | |
var $container = $( '<div>' ).css( { | |
height: $('#primary').height(), | |
width: 250, | |
position: 'relative', | |
display: 'block', | |
'float': 'right' | |
} ).insertAfter( '#secondary' ); | |
$.getScript( 'http://jonrobson.me.uk/wlm/polaroiderizer.js', function() { |
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
( function( $ ) { | |
$('<div id="wlm-stream-widget" style="position:relative;display:block;float:right;width:250px;height:500px;display:block;"></div>').appendTo( '#secondary' ); | |
$( '<link rel="stylesheet" >' ).attr( 'href', 'http://jonrobson.me.uk/wlm/p.css' ).appendTo( document.head ); | |
$.getScript( 'http://jonrobson.me.uk/wlm/polaroiderizer.js', function() { | |
polaroiderizer( $( '#wlm-stream-widget' ), | |
{ | |
iiurlwidth: '320px', | |
action: 'query', | |
gcmsort: 'timestamp', gcmdir: 'desc', |
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
config = { | |
'sender': 'a@b.com', | |
'mailer':{'smtp':'xxx','pop':'xxxx','username':'xxxx','password':'xxxx' }, | |
'receiver': { | |
'site': [ 'x@y.com' ], | |
'app': [ 'x@y.com' ], | |
'spam': [ 'x@y.com' ] | |
} | |
} |
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
#mw-mf-watchlist { | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
-o-user-select: none; | |
user-select: none; | |
.mw-mf-watchlist-selector { | |
text-align: center; | |
padding: 8px 0px; |
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
diff --git a/includes/MobileContext.php b/includes/MobileContext.php | |
index de0c1d7..2b9fb1e 100644 | |
--- a/includes/MobileContext.php | |
+++ b/includes/MobileContext.php | |
@@ -32,7 +32,6 @@ class MobileContext extends ContextSource { | |
protected $mobileAction; | |
private $forceMobileView = false; | |
- private $forceLeftMenu = false; | |
private $contentTransformations = true; |
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
diff --git a/MobileFrontend.php b/MobileFrontend.php | |
index 55f8718..2a83d33 100644 | |
--- a/MobileFrontend.php | |
+++ b/MobileFrontend.php | |
@@ -107,6 +107,7 @@ $wgHooks['UserLoginComplete'][] = 'MobileFrontendHooks::onUserLoginComplete'; | |
$wgHooks['UserLoginForm'][] = 'MobileFrontendHooks::onUserLoginForm'; | |
$wgHooks['UserCreateForm'][] = 'MobileFrontendHooks::onUserCreateForm'; | |
$wgHooks['BeforePageDisplay'][] = 'MobileFrontendHooks::onBeforePageDisplay'; | |
+$wgHooks['OutputPageParserOutput'][] = 'MobileFrontendHooks::onOutputPageParserOutput'; | |
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
#usage ./scripts/cachedpage.sh 1bd5bc53ebb04fff7f508712a29fdf1f1d7fe14f | |
#must be run an a branch with no stashed changes | |
#git stash - only do this if local changes | |
cur_branch=`git rev-parse --abbrev-ref HEAD` | |
# fIXME: if current branch is HEAD then create a tmp branch here and set it to cur_branch... | |
git checkout $1 #go to last known deployed commit | |
wget http://localhost/w/index.php/Main_Page -O cached.html | |
wget http://localhost/w/index.php/Special:MobileOptions -O cached_special.html | |
git checkout $cur_branch | |
open http://localhost/w/extensions/MobileFrontend/cached.html |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script type="text/javascript" src="javascripts/externals/history.js"></script> | |
<script type="text/javascript" src="javascripts/externals/history.adapter.jquery.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> |