Skip to content

Instantly share code, notes, and snippets.

View catrope's full-sized avatar

Roan Kattouw catrope

  • Wikimedia Foundation
  • San Francisco, CA
View GitHub Profile
bf1574f Add MobileSurface to .docs/eg-iframe.html
dc596bf Moving citation tool code in API module into its own function
97bc12a Cache image scalable promises by filename
7dae649 mw.ViewPageTarget: Get rid of FOUC on edit section brackets
c9c6df0 Update VE core submodule to master (1fa7b5f)
c79a46e Updating scalable default in MediaSizeWidget
7bf9c7e Cache references in handleDelete
e5f74b7 unicodejs: Update moveBreakOffset to include 'HebrewLetter' category
a5b21b6 Fix watch list
6508e88 Directionality fixes in SA demo
b00999c Style the FormatTool to be more like Vector's new look
65d9217 Use correct fragment in windows
a2309da Update VE core submodule to master (ca76a5b)
e08bf9d [BREAKING CHANGE] Show matched string in LanguageSearchWidget results
9600128 Remove '*' selector for protected nodes
529f971 Update OOjs UI to v0.1.0-pre (301887f487)
d641133 Add Agora theme dialogs
1210902 Switch to use MediaWiki's built-in messages for post-edit notifications
8d202e8 Add LanguageResultWidget files
setup: function () {
return Classname.super.prototype.setup.call( this ).after( function() { ... } );
}
teardown: function () {
return parent().before( function () { .... } );
}
callbackList.before: unshift
callbackList.after: push
2bc50e2 Image frame icons
7645b98 Call clearAllMessages in setup instead of swapPanel on the save dialog
9beb92a Delete extensions nodes which have been made empty
ac86023 Export showtoc and hidetoc messages
032d9d5 Fix tab selection on monobook
e815d58 Don't change section edit links on foreign file description pages
3569efb Use TemplateData's `suggested` status for parameters
a72da56 Add dynamically generated list of namespaces to visualeditor-enable preference
0a37cfb Pull in Parsoid's new styling module
f0f314c Remove useless overrides in HieroInpsector
@catrope
catrope / gist:11227304
Created April 23, 2014 18:32
VE wmf1..(wmf2)
df31082 Remove Function.prototype.bind from compatibility check
32446f3 Add whitespace
dc401545 Remove getVersion from api module
ca547a7 Check useeditwarning preference before showing warning when browsing away from editor
8070f48 Extension inspector directionality
89f0406 Disable transclusion dialog mode button while loading
062b2ed Make transclusion dialog "pending" while loading
29476af Use forced directionality for HieroInspector
e09e6c9 Create MWLiveExtensionInspector base class
28bd951 Make Hiero node live update
@catrope
catrope / gist:9945606
Created April 2, 2014 23:44
Fixes for nullable selection (VE-MW)
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 40cd5c4..cfe5584 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -715,11 +715,14 @@ ve.init.mw.ViewPageTarget.prototype.onToolbarMetaButtonClick = function () {
* @param {ve.dm.Transaction} transaction
*/
ve.init.mw.ViewPageTarget.prototype.checkForWikitextWarning = function () {
- var text, doc = this.surface.getView().getDocument(),
+ var text, node, doc = this.surface.getView().getDocument(),
@catrope
catrope / gist:9945583
Created April 2, 2014 23:43
Fixes for nullable selection (VE core)
diff --git a/modules/ve/dm/ve.dm.Surface.js b/modules/ve/dm/ve.dm.Surface.js
index 6e07f70..8ecd560 100644
--- a/modules/ve/dm/ve.dm.Surface.js
+++ b/modules/ve/dm/ve.dm.Surface.js
@@ -525,7 +525,7 @@ ve.dm.Surface.prototype.changeInternal = function ( transactions, selection, ski
( !selectionBefore || !selectionBefore.equals( selectionAfter ) ) &&
( selectionAfter && selectionAfter.equals( this.selection ) )
) {
- this.emit( 'select', this.selection.clone() );
+ this.emit( 'select', this.selection && this.selection.clone() );
@catrope
catrope / gist:9940235
Last active August 29, 2015 13:58
VE wmf20..(wmf21)
f1afe2f Kill $wgVisualEditorEditNotices
c83ef84 [browser test] updates for no beta warning to dismiss
6acac41 Update VE core submodule to master (5a86ff9)
6b1d082 Update OOjs UI to v0.1.0-pre (e9e435be5e)
e9e435b Move padding rules for OutlineItemWidget from core to skins.
24eec6f Fix ClickableNode documentation comment to add a missing period
d2fb10f Localisation updates from https://translatewiki.net.
5a86ff9 Update OOjs UI to v0.1.0-pre (23fb1b6144)
41e01ca Add documentation explaining what's going on in GroupWidget
@catrope
catrope / gist:9787917
Created March 26, 2014 16:53
VE wmf19..(wmf20)
4bc8205 Add new 'vehidebetadialog' GET parameter to not show the beta dialog
8931e97 Update VE core submodule to 04d67d2ec817e6f9d8c983570f6080ee7acd1110
bac2081 Update OOjs UI to v0.1.0-pre (0f50cdc46c)
6c014fd Revert "Use super to call parent methods"
08eaf66 Update context on transact, in addition to select
6151ffb Add class to internal item nodes
7d0062d Propagate destroy calls down to children of branch nodes
04d67d2 Use transaction comparison to decide to render or not
@catrope
catrope / gist:9648465
Created March 19, 2014 18:44
wmf18..(wmf19)
1948ed8 Fix regression bug 'default size' change on alignment
ba71dad Add new ve.dm.CommentMetaItem.js to .docs/eg-iframe.html
9d7eedd Update VE core submodule to master (07923f7)
05f775d Update OOjs UI to v0.1.0-pre (46ccd5b3a7)
3ab4d6d Balance margins around icon on iconed ButtonWidget
8d69f53 Add missing 75% transparency to add-item
2c0ae23 Add indicators to demo page
3027b13 readme: Fix broken Markdown list syntax
d7ab327 Update oojs to v1.0.8
4dd7320 Drop file "OO.ui" file prefix