mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-14 10:04:52 +00:00
3e9b227a6a
Consistently: * Use <!DOCTYPE html>. * Use lowercase element tags. * Indent <head> from <html>. * Use <meta charset="utf-8">. * Indent <script> and <style> content from open/close tag. * Put <link> before <script> when in <head> (in ve/test). * Use .html instead of .php for indexes where PHP is no longer used. * Use the same license header as we use elsewhere (/*! instead of /** and no @file) Gruntfile: * Include the new .js files in jshint (demos/**/*.js). * Order buildloader keys in the same order as the directories they go to (alphabetically). * Add missing jshint patterns: - .docs/**/*.js - build/**/*.js - modules/ve-wmf/**/*.js * Add missing qunit test: - qunit.unicodejs * Add missing watch patterns: - .jscs.json - qunit.unicodejs Also: * Moved relatively large pieces of script into separate files so that they are less repeated (though .template) and also able to be linted properly. * Fixed jshint warnings in newly-created trigger.js and demo.js. * Moved <script> elements already in <body> to bottom of <body> (in ve/test and eg-iframe). * Moved <script> in eg-iframe from <head> to <body>. * Fixed buildloader grunt task to use a non-\n whitespace match. for the start as well, the newline before the placeholder was being stripped. * Removed the (now obsolete) index-phantomjs-tmp hack. Change-Id: I7c5a371b82f69f367a8e1c11673d2f37868bc931
37 lines
649 B
Plaintext
37 lines
649 B
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>VisualEditor Example</title>
|
|
|
|
<!-- STYLES -->
|
|
|
|
<!-- example styles -->
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-y: scroll;
|
|
background: #fff;
|
|
font: normal 1em/1.5 sans-serif;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- SCRIPTS -->
|
|
|
|
<!-- example scripts -->
|
|
<script>
|
|
function loadInlineExample( code, options, callback ) {
|
|
try {
|
|
eval( code );
|
|
callback && callback( true );
|
|
} catch (e) {
|
|
document.body.appendChild( document.createTextNode( e ) );
|
|
callback && callback( false, e );
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|