init
This commit is contained in:
4
include/jQuery/jquery-timepicker/.gitignore
vendored
Normal file
4
include/jQuery/jquery-timepicker/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.DS_store
|
||||
*.sw*
|
||||
node_modules
|
||||
.idea
|
||||
41
include/jQuery/jquery-timepicker/GruntFile.js
vendored
Normal file
41
include/jQuery/jquery-timepicker/GruntFile.js
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
meta: {
|
||||
banner : '/*!\n' +
|
||||
' * <%= pkg.title %> v<%= pkg.version %> - <%= pkg.description %>\n' +
|
||||
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> - <%= pkg.homepage %>\n' +
|
||||
' * License: <%= pkg.license %>\n' +
|
||||
' */\n\n'
|
||||
},
|
||||
uglify: {
|
||||
options : {
|
||||
banner : '<%= meta.banner %>',
|
||||
report: 'gzip'
|
||||
},
|
||||
dist: {
|
||||
files: {
|
||||
'jquery.timepicker.min.js': ['jquery.timepicker.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
minify: {
|
||||
files: {
|
||||
'jquery.timepicker.min.css': ['jquery.timepicker.css']
|
||||
}
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
all: ['jquery.timepicker.js']
|
||||
},
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
|
||||
grunt.registerTask('default', ['uglify', 'cssmin']);
|
||||
|
||||
};
|
||||
391
include/jQuery/jquery-timepicker/index.html
Normal file
391
include/jQuery/jquery-timepicker/index.html
Normal file
@@ -0,0 +1,391 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
|
||||
<title>Timepicker for jQuery – Demos and Documentation</title>
|
||||
<meta name="description" content="A lightweight, customizable jQuery timepicker plugin inspired by Google Calendar. Add a user-friendly javascript timepicker dropdown to your app in minutes." />
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="jquery.timepicker.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="jquery.timepicker.css" />
|
||||
|
||||
<script type="text/javascript" src="lib/bootstrap-datepicker.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="lib/bootstrap-datepicker.css" />
|
||||
|
||||
<script type="text/javascript" src="lib/site.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="lib/site.css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
|
||||
<h1><a href="https://github.com/jonthornton/jquery-timepicker">jquery.timepicker</a></h1>
|
||||
<p class="body-text">
|
||||
A lightweight, customizable javascript timepicker plugin for jQuery inspired by Google Calendar.
|
||||
</p>
|
||||
|
||||
<ul id="header-links">
|
||||
<li><a href="https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery">Documentation</a></li>
|
||||
<li><a href="https://github.com/jonthornton/jquery-timepicker">Source code on GitHub</a></li>
|
||||
<li><a href="https://github.com/jonthornton/jquery-timepicker/zipball/master">Download (zip)</a></li>
|
||||
<li><a href="https://github.com/jonthornton/jquery-timepicker/issues?state=open">Help</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<p class="body-text">Use this plugin to unobtrusively add a timepicker dropdown to your forms. It's lightweight (2.7kb minified and gzipped) and easy to customize.</p>
|
||||
</section>
|
||||
|
||||
<section id="examples">
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Basic Example</h2>
|
||||
<p><input id="basicExample" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#basicExample').timepicker();
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#basicExample').timepicker();</pre>
|
||||
</article>
|
||||
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Scroll Default Example</h2>
|
||||
<p>Set the scroll position to local time if no value selected.</p>
|
||||
<p><input id="scrollDefaultExample" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#scrollDefaultExample').timepicker({ 'scrollDefault': 'now' });
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#scrollDefaultExample').timepicker({ 'scrollDefault': 'now' });</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Set Time Example</h2>
|
||||
<p>Dynamically set the time using a Javascript Date object.</p>
|
||||
<p>
|
||||
<input id="setTimeExample" type="text" class="time" />
|
||||
<button id="setTimeButton">Set current time</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#setTimeExample').timepicker();
|
||||
$('#setTimeButton').on('click', function (){
|
||||
$('#setTimeExample').timepicker('setTime', new Date());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#setTimeExample').timepicker();
|
||||
$('#setTimeButton').on('click', function (){
|
||||
$('#setTimeExample').timepicker('setTime', new Date());
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Duration Example</h2>
|
||||
<p>Set a starting time and see duration from that starting time. You can optionally set an maxTime as well.</p>
|
||||
<p><input id="durationExample" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#durationExample').timepicker({
|
||||
'minTime': '2:00pm',
|
||||
'maxTime': '11:30pm',
|
||||
'showDuration': true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#durationExample').timepicker({
|
||||
'minTime': '2:00pm',
|
||||
'maxTime': '11:30pm',
|
||||
'showDuration': true
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Event Example</h2>
|
||||
<p>Trigger an event after selecting a value. Fires before the input onchange event.</p>
|
||||
<p>
|
||||
<input id="onselectExample" type="text" class="time" />
|
||||
<span id="onselectTarget" style="margin-left: 30px;"></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#onselectExample').timepicker();
|
||||
$('#onselectExample').on('changeTime', function() {
|
||||
$('#onselectTarget').text($(this).val());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#onselectExample').timepicker();
|
||||
$('#onselectExample').on('changeTime', function() {
|
||||
$('#onselectTarget').text($(this).val());
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>DisableTimeRanges Example</h2>
|
||||
<p>Prevent selection of certain time values.</p>
|
||||
<p><input id="disableTimeRangesExample" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#disableTimeRangesExample').timepicker({ 'disableTimeRanges': [['1am', '2am'], ['3am', '4:01am']] });
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#disableTimeRangesExample').timepicker({
|
||||
'disableTimeRanges': [
|
||||
['1am', '2am'],
|
||||
['3am', '4:01am']
|
||||
]
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>noneOption Example</h2>
|
||||
<p>Custom options can be added to the dropdown menu.</p>
|
||||
<p><input id="noneOptionExample" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#noneOptionExample').timepicker({
|
||||
'noneOption': [
|
||||
{
|
||||
'label': 'Foobar',
|
||||
'className': 'shibby',
|
||||
'value': '42'
|
||||
},
|
||||
'Foobar2'
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">
|
||||
$('#noneOptionExample').timepicker({
|
||||
'noneOption': [
|
||||
{
|
||||
'label': 'Foobar',
|
||||
'className': 'shibby',
|
||||
'value': '42'
|
||||
},
|
||||
'Foobar2'
|
||||
]
|
||||
});
|
||||
</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>timeFormat Example</h2>
|
||||
<p>timepicker.jquery uses the time portion of <a href="http://php.net/manual/en/function.date.php">PHP's date formatting commands</a>.</p>
|
||||
<p><input id="timeformatExample1" type="text" class="time" /> <input id="timeformatExample2" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' });
|
||||
$('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' });
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' });
|
||||
$('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' });</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Step Example</h2>
|
||||
<p>Generate drop-down options with varying levels of precision.</p>
|
||||
<p><input id="stepExample1" type="text" class="time" /> <input id="stepExample2" type="text" class="time" /></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#stepExample1').timepicker({ 'step': 15 });
|
||||
$('#stepExample2').timepicker({
|
||||
'step': function(i) {
|
||||
return (i%2) ? 15 : 45;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#stepExample1').timepicker({ 'step': 15 });
|
||||
$('#stepExample2').timepicker({
|
||||
'step': function(i) {
|
||||
return (i%2) ? 15 : 45;
|
||||
}
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>forceRoundTime Example</h2>
|
||||
<p>jquery-timepicker allows entering times via the keyboard. Setting forceRoundTime to true will
|
||||
round the entered time to the nearest option on the dropdown list.</p>
|
||||
<p><input id="roundTimeExample" type="text" class="time" /> </p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#roundTimeExample').timepicker({ 'forceRoundTime': true });
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#roundTimeExample').timepicker({ 'forceRoundTime': true });</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Select Example</h2>
|
||||
<p>jquery-timepicker can render itself as a select element too.</p>
|
||||
<p><input id="selectExample" class="time" /> <button id="selectButton">Toggle</button></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#selectExample').timepicker();
|
||||
$('#selectButton').click(function(e) {
|
||||
$('#selectExample').timepicker('option', { useSelect: true });
|
||||
$(this).hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#selectExample').timepicker();
|
||||
$('#selectButton').click(function(e) {
|
||||
$('#selectExample').timepicker('option', { useSelect: true });
|
||||
$(this).hide();
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Non-input Example</h2>
|
||||
<p>jquery-timepicker can be bound to any visibile DOM element, such as spans or divs.</p>
|
||||
<p><span id="spanExample" style="background:#f00; padding:0 10px; margin-right:100px;"></span> <button id="openSpanExample">Pick Time</button> </p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#spanExample').timepicker();
|
||||
$('#openSpanExample').on('click', function(){
|
||||
$('#spanExample').timepicker('show');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">$('#spanExample').timepicker();
|
||||
$('#openSpanExample').on('click', function(){
|
||||
$('#spanExample').timepicker('show');
|
||||
});</pre>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<div class="demo">
|
||||
<h2>Datepair Plugin Example</h2>
|
||||
|
||||
<p>jquery-timepicker is designed to work with the <a href="http://jonthornton.github.com/Datepair.js">jquery-datepair plugin</a>.
|
||||
|
||||
<p id="datepairExample">
|
||||
<input type="text" class="date start" />
|
||||
<input type="text" class="time start" /> to
|
||||
<input type="text" class="time end" />
|
||||
<input type="text" class="date end" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script src="http://jonthornton.github.io/Datepair.js/dist/datepair.js"></script>
|
||||
<script src="http://jonthornton.github.io/Datepair.js/dist/jquery.datepair.js"></script>
|
||||
<script>
|
||||
$('#datepairExample .time').timepicker({
|
||||
'showDuration': true,
|
||||
'timeFormat': 'g:ia'
|
||||
});
|
||||
|
||||
$('#datepairExample .date').datepicker({
|
||||
'format': 'm/d/yyyy',
|
||||
'autoclose': true
|
||||
});
|
||||
|
||||
$('#datepairExample').datepair();
|
||||
</script>
|
||||
|
||||
<pre class="code" data-language="javascript">
|
||||
<p id="datepairExample">
|
||||
<input type="text" class="date start" />
|
||||
<input type="text" class="time start" /> to
|
||||
<input type="text" class="time end" />
|
||||
<input type="text" class="date end" />
|
||||
</p>
|
||||
|
||||
<script type="text/javascript" src="datepair.js"></script>
|
||||
<script type="text/javascript" src="jquery.datepair.js"></script>
|
||||
<script>
|
||||
// initialize input widgets first
|
||||
$('#datepairExample .time').timepicker({
|
||||
'showDuration': true,
|
||||
'timeFormat': 'g:ia'
|
||||
});
|
||||
|
||||
$('#datepairExample .date').datepicker({
|
||||
'format': 'yyyy-m-d',
|
||||
'autoclose': true
|
||||
});
|
||||
|
||||
// initialize datepair
|
||||
$('#datepairExample').datepair();
|
||||
</script></pre>
|
||||
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Need Help?</h2>
|
||||
<p>Check <a href="https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery">the documentation</a> or <a href="https://github.com/jonthornton/jquery-timepicker/issues?state=open">submit an issue</a> on GitHub.</p>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<p>© 2014 <a href="http://jonthornton.com">Jon Thornton</a></p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-15605525-4', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</div></body>
|
||||
</html>
|
||||
1286
include/jQuery/jquery-timepicker/jquery.timepicker.js
Normal file
1286
include/jQuery/jquery-timepicker/jquery.timepicker.js
Normal file
File diff suppressed because it is too large
Load Diff
7
include/jQuery/jquery-timepicker/jquery.timepicker.min.js
vendored
Normal file
7
include/jQuery/jquery-timepicker/jquery.timepicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1671
include/jQuery/jquery-timepicker/lib/bootstrap-datepicker.js
vendored
Normal file
1671
include/jQuery/jquery-timepicker/lib/bootstrap-datepicker.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
include/jQuery/jquery-timepicker/lib/site.js
vendored
Normal file
10
include/jQuery/jquery-timepicker/lib/site.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/* Rainbow v1.1.9 rainbowco.de | included languages: generic, javascript */
|
||||
window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return c}function B(a){var b=q(a)||q(a.parentNode);if(!b){var c=/\blang(?:uage)?-(\w+)/;(a=a.className.match(c)||a.parentNode.className.match(c))&&(b=a[1])}return b}function C(a,b){for(var c in e[d]){c=parseInt(c,10);if(a==c&&b==e[d][c]?0:a<=c&&b>=e[d][c])delete e[d][c],delete j[d][c];if(a>=c&&a<e[d][c]||
|
||||
b>c&&b<e[d][c])return!0}return!1}function r(a,b){return'<span class="'+a.replace(/\./g," ")+(l?" "+l:"")+'">'+b+"</span>"}function s(a,b,c,h){var f=a.exec(c);if(f){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=f[0],i=f.index,u=f[0].length+i,g=function(){function f(){s(a,b,c,h)}t%100>0?f():setTimeout(f,0)};if(C(i,u))g();else{var m=v(b.matches),l=function(a,c,h){if(a>=c.length)h(k);else{var d=f[c[a]];if(d){var e=b.matches[c[a]],i=e.language,g=e.name&&e.matches?
|
||||
e.matches:e,j=function(b,d,e){var i;i=0;var g;for(g=1;g<c[a];++g)f[g]&&(i=i+f[g].length);d=e?r(e,d):d;k=k.substr(0,i)+k.substr(i).replace(b,d);l(++a,c,h)};i?n(d,i,function(a){j(d,a)}):typeof e==="string"?j(d,d,e):w(d,g.length?g:[g],function(a){j(d,a,e.matches?e.name:0)})}else l(++a,c,h)}};l(0,m,function(a){b.name&&(a=r(b.name,a));if(!j[d]){j[d]={};e[d]={}}j[d][i]={replace:f[0],"with":a};e[d][i]=u;g()})}}else h()}function v(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort(function(a,
|
||||
b){return b-a})}function w(a,b,c){function h(b,k){k<b.length?s(b[k].pattern,b[k],a,function(){h(b,++k)}):D(a,function(a){delete j[d];delete e[d];--d;c(a)})}++d;h(b,0)}function D(a,b){function c(a,b,h,e){if(h<b.length){++x;var g=b[h],l=j[d][g],a=a.substr(0,g)+a.substr(g).replace(l.replace,l["with"]),g=function(){c(a,b,++h,e)};0<x%250?g():setTimeout(g,0)}else e(a)}var h=v(j[d]);c(a,h,0,b)}function n(a,b,c){var d=m[b]||[],f=m[y]||[],b=z[b]?d:d.concat(f);w(a.replace(/</g,"<").replace(/>/g,">").replace(/&(?![\w\#]+;)/g,
|
||||
"&"),b,c)}function o(a,b,c){if(b<a.length){var d=a[b],f=B(d);return!(-1<(" "+d.className+" ").indexOf(" rainbow "))&&f?(f=f.toLowerCase(),d.className+=d.className?" rainbow":"rainbow",n(d.innerHTML,f,function(k){d.innerHTML=k;j={};e={};p&&p(d,f);setTimeout(function(){o(a,++b,c)},0)})):o(a,++b,c)}c&&c()}function A(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,c=a.getElementsByTagName("pre"),d=a.getElementsByTagName("code"),f,e=[];for(f=0;f<d.length;++f)e.push(d[f]);for(f=0;f<
|
||||
c.length;++f)c[f].getElementsByTagName("code").length||e.push(c[f]);o(e,0,b)}var j={},e={},m={},z={},d=0,y=0,t=0,x=0,l,p;return{extend:function(a,b,c){1==arguments.length&&(b=a,a=y);z[a]=c;m[a]=b.concat(m[a]||[])},b:function(a){p=a},a:function(a){l=a},color:function(a,b,c){if("string"==typeof a)return n(a,b,c);if("function"==typeof a)return A(0,a);A(a,b)}}}();window.addEventListener?window.addEventListener("load",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color);Rainbow.onHighlight=Rainbow.b;
|
||||
Rainbow.addClass=Rainbow.a;Rainbow.extend([{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b(and|array|as|bool(ean)?|c(atch|har|lass|onst)|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi},
|
||||
{name:"constant.language",pattern:/true|false|null/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g},{matches:{1:"function.call"},pattern:/(\w+?)(?=\()/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(function)\s(.*?)(?=\()/g}]);Rainbow.extend("javascript",[{name:"selector",pattern:/(\s|^)\$(?=\.|\()/g},{name:"support",pattern:/\b(window|document)\b/g},{matches:{1:"support.property"},pattern:/\.(length|node(Name|Value))\b/g},{matches:{1:"support.function"},pattern:/(setTimeout|setInterval)(?=\()/g},{matches:{1:"support.method"},pattern:/\.(getAttribute|push|getElementById|getElementsByClassName|log|setTimeout|setInterval)(?=\()/g},{matches:{1:"support.tag.script",2:[{name:"string",pattern:/('|")(.*?)(\1)/g},{name:"entity.tag.script",
|
||||
pattern:/(\w+)/g}],3:"support.tag.script"},pattern:/(<\/?)(script.*?)(>)/g},{name:"string.regexp",matches:{1:"string.regexp.open",2:{name:"constant.regexp.escape",pattern:/\\(.){1}/g},3:"string.regexp.close",4:"string.regexp.modifier"},pattern:/(\/)(?!\*)(.+)(\/)([igm]{0,3})/g},{matches:{1:"storage",3:"entity.function"},pattern:/(var)?(\s|^)(.*)(?=\s?=\s?function\()/g},{name:"entity.function",pattern:/(\w+)(?=:\s{0,}function)/g}]);
|
||||
Reference in New Issue
Block a user