code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function boxAttr(key, value) {
if (box) {
box.attr(key, value);
} else {
deferredAttr[key] = value;
}
} | Set a box attribute, or defer it if the box is not yet created
@param {Object} key
@param {Object} value | boxAttr | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function getSizeAfterAdd() {
text.add(wrapper);
wrapper.attr({
text: str, // alignment is available now
x: x,
y: y
});
if (box && defined(anchorX)) {
wrapper.attr({
anchorX: anchorX,
anchorY: anchorY
});
}
} | Set a box attribute, or defer it if the box is not yet created
@param {Object} key
@param {Object} value | getSizeAfterAdd | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
addFillNode = function () {
// Add the fill subnode. When colors attribute is used, the meanings of opacity and o:opacity2
// are reversed.
markup = ['<fill colors="' + colors.join(',') + '" opacity="', opacity2, '" o:opacity2="', opacity1,
'" type="', fillType, '" ', fillAttr, 'focus="100%" method... | Take a color and return it if it's a string, make it a gradient if it's a
gradient configuration object, and apply opacity.
@param {Object} color The color or config object | addFillNode | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
applyRadialGradient = function () {
if (radialReference) {
bBox = wrapper.getBBox();
cx += (radialReference[0] - bBox.x) / bBox.width - 0.5;
cy += (radialReference[1] - bBox.y) / bBox.height - 0.5;
sizex *= radialReference[2] / bBox.width;
sizey *= radialReference[2] / bBo... | Take a color and return it if it's a string, make it a gradient if it's a
gradient configuration object, and apply opacity.
@param {Object} color The color or config object | applyRadialGradient | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function drawDeferred() {
var callLength = deferredRenderCalls.length,
callIndex;
// Draw all pending render calls
for (callIndex = 0; callIndex < callLength; callIndex++) {
deferredRenderCalls[callIndex]();
}
// Clear the list
deferredRenderCalls = [];
} | When downloaded, we are ready to draw deferred charts. | drawDeferred | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function PlotLineOrBand(axis, options) {
this.axis = axis;
if (options) {
this.options = options;
this.id = options.id;
}
} | The object wrapper for plot lines and plot bands
@param {Object} options | PlotLineOrBand | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function Axis() {
this.init.apply(this, arguments);
} | Create a new axis object
@param {Object} chart
@param {Object} options | Axis | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function Tooltip() {
this.init.apply(this, arguments);
} | The tooltip object
@param {Object} chart The chart instance
@param {Object} options Tooltip options | Tooltip | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function Pointer(chart, options) {
this.init(chart, options);
} | The mouse tracker object. All methods starting with "on" are primary DOM event handlers.
Subsequent methods should be named differently from what they are doing.
@param {Object} chart The Chart instance
@param {Object} options The root options object | Pointer | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
setScale = function () {
if (!singleTouch && mathAbs(touch0Start - touch1Start) > 20) { // Don't zoom if fingers are too close on this axis
scale = mathAbs(touch0Now - touch1Now) / mathAbs(touch0Start - touch1Start);
}
clipXY = ((plotLeftTop - touch0Now) / scale) + touch0Start;
selectionWH = ... | Run translation operations for each direction (horizontal and vertical) independently | setScale | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function Legend(chart, options) {
this.init(chart, options);
} | The overview of the chart's series | Legend | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function Chart() {
this.init.apply(this, arguments);
} | The chart class
@param {Object} options
@param {Function} callback Function to run when the chart has loaded | Chart | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function reflow(e) {
var width = optionsChart.width || adapterRun(renderTo, 'width'),
height = optionsChart.height || adapterRun(renderTo, 'height'),
target = e ? e.target : win; // #805 - MooTools doesn't supply e
// Width and height checks for display:none. Target is doc in IE8 and Opera,
// win... | Add the event handlers necessary for auto resizing | reflow | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function setInvert() {
var size = {
width: series.yAxis.len,
height: series.xAxis.len
};
each(['group', 'markerGroup'], function (groupName) {
if (series[groupName]) {
series[groupName].attr(size).invert();
}
});
} | Initialize and perform group inversion on series.group and series.markerGroup | setInvert | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
onMouseOver = function () {
if (chart.hoverSeries !== series) {
series.onMouseOver();
}
} | Draw the tracker object that sits above all data labels and markers to
track mouse events on the graph or points. For the line type charts
the tracker uses the same graphPath, but with a greater stroke width
for better control. | onMouseOver | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
onMouseOver = function (e) {
var target = e.target,
point;
if (chart.hoverSeries !== series) {
series.onMouseOver();
}
while (target && !point) {
point = target.point;
target = target.parentNode;
}
if (point !== UNDEFINED && point !== chart.hoverPoint) { // undefined on grap... | Add tracking event listener to the series group, so the point graphics
themselves act as trackers | onMouseOver | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
sort = function (a, b) {
return b.y - a.y;
} | Override the base drawDataLabels method by pie specific functionality | sort | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/highcharts.src.js | MIT |
function augment(obj) {
function removeOneEvent(el, type, fn) {
el.removeEventListener(type, fn, false);
}
function IERemoveOneEvent(el, type, fn) {
fn = el.HCProxiedMethods[fn.toString()];
el.detachEvent('on' + type, fn);
}
function removeAllEvents(el, type) {
var events = el.HCEvents,
remove,
typ... | Extend given object with custom events | augment | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | MIT |
function removeOneEvent(el, type, fn) {
el.removeEventListener(type, fn, false);
} | Extend given object with custom events | removeOneEvent | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | MIT |
function IERemoveOneEvent(el, type, fn) {
fn = el.HCProxiedMethods[fn.toString()];
el.detachEvent('on' + type, fn);
} | Extend given object with custom events | IERemoveOneEvent | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | MIT |
function removeAllEvents(el, type) {
var events = el.HCEvents,
remove,
types,
len,
n;
if (el.removeEventListener) {
remove = removeOneEvent;
} else if (el.attachEvent) {
remove = IERemoveOneEvent;
} else {
return; // break on non-DOM events
}
if (type) {
types = {};
types[type]... | Extend given object with custom events | removeAllEvents | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/adapters/standalone-framework.src.js | MIT |
getValueCount = function (type) {
return (Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap || [0]).length;
} | Get the column distribution. For example, a line series takes a single column for
Y values. A range series takes two columns for low and high values respectively,
and an OHLC series takes four columns. | getValueCount | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/modules/data.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/modules/data.src.js | MIT |
drawTrackerWrapper = function (proceed) {
proceed.call(this);
each(this.points, function (point) {
if (point.drilldown && point.graphic) {
point.graphic
.attr({
'class': 'highcharts-drilldown-point'
})
.css({ cursor: 'pointer' });
}
});
} | When drilling up, pull out the individual point graphics from the lower series
and animate them into the origin point in the upper series. | drawTrackerWrapper | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/modules/drilldown.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/modules/drilldown.src.js | MIT |
function hasDataPie() {
return !!this.points.length; /* != 0 */
} | Define hasData functions for series. These return true if there are data points on this series within the plot area | hasDataPie | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/modules/no-data-to-display.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/modules/no-data-to-display.src.js | MIT |
function handleNoData() {
var chart = this;
if (chart.hasData()) {
chart.hideNoData();
} else {
chart.showNoData();
}
} | Show no-data message if there is no data in sight. Otherwise, hide it. | handleNoData | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/highcharts/modules/no-data-to-display.src.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/highcharts/modules/no-data-to-display.src.js | MIT |
function defaultGetHtml(highlighter, name)
{
return sh.toolbar.getButtonHtml(highlighter, name, sh.config.strings[name]);
} | Generates HTML markup for the toolbar.
@param {Highlighter} highlighter Highlighter instance.
@return {String} Returns HTML markup. | defaultGetHtml | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function hasClass(target, className)
{
return target.className.indexOf(className) != -1;
} | Checks if target DOM elements has specified CSS class.
@param {DOMElement} target Target DOM element to check.
@param {String} className Name of the CSS class to check for.
@return {Boolean} Returns true if class name is present, false otherwise. | hasClass | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function addClass(target, className)
{
if (!hasClass(target, className))
target.className += ' ' + className;
} | Adds CSS class name to the target DOM element.
@param {DOMElement} target Target DOM element.
@param {String} className New CSS class to add. | addClass | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function removeClass(target, className)
{
target.className = target.className.replace(className, '');
} | Removes CSS class name from the target DOM element.
@param {DOMElement} target Target DOM element.
@param {String} className CSS class to remove. | removeClass | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function toArray(source)
{
var result = [];
for (var i = 0; i < source.length; i++)
result.push(source[i]);
return result;
} | Converts the source to array object. Mostly used for function arguments and
lists returned by getElementsByTagName() which aren't Array objects.
@param {List} source Source list.
@return {Array} Returns array. | toArray | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function splitLines(block)
{
return block.split(/\r?\n/);
} | Splits block of text into lines.
@param {String} block Block of text.
@return {Array} Returns array of lines. | splitLines | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getHighlighterId(id)
{
var prefix = 'highlighter_';
return id.indexOf(prefix) == 0 ? id : prefix + id;
} | Generates HTML ID for the highlighter.
@param {String} highlighterId Highlighter ID.
@return {String} Returns HTML ID. | getHighlighterId | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getHighlighterById(id)
{
return sh.vars.highlighters[getHighlighterId(id)];
} | Finds Highlighter instance by ID.
@param {String} highlighterId Highlighter ID.
@return {Highlighter} Returns instance of the highlighter. | getHighlighterById | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getHighlighterDivById(id)
{
return document.getElementById(getHighlighterId(id));
} | Finds highlighter's DIV container.
@param {String} highlighterId Highlighter ID.
@return {Element} Returns highlighter's DIV element. | getHighlighterDivById | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function storeHighlighter(highlighter)
{
sh.vars.highlighters[getHighlighterId(highlighter.id)] = highlighter;
} | Stores highlighter so that getHighlighterById() can do its thing. Each
highlighter must call this method to preserve itself.
@param {Highilghter} highlighter Highlighter instance. | storeHighlighter | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function findElement(target, search, reverse /* optional */)
{
if (target == null)
return null;
var nodes = reverse != true ? target.childNodes : [ target.parentNode ],
propertyToFind = { '#' : 'id', '.' : 'className' }[search.substr(0, 1)] || 'nodeName',
expec... | Looks for a child or parent node which has specified classname.
Equivalent to jQuery's $(container).find(".className")
@param {Element} target Target element.
@param {String} search Class name or node name to look for.
@param {Boolean} reverse If set to true, will go up the node tree instead of down.
@return {Element} ... | findElement | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function findParentElement(target, className)
{
return findElement(target, className, true);
} | Looks for a parent node which has specified classname.
This is an alias to <code>findElement(container, className, true)</code>.
@param {Element} target Target element.
@param {String} className Class name to look for.
@return {Element} Returns found parent element on null. | findParentElement | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function indexOf(array, searchElement, fromIndex)
{
fromIndex = Math.max(fromIndex || 0, 0);
for (var i = fromIndex; i < array.length; i++)
if(array[i] == searchElement)
return i;
return -1;
} | Finds an index of element in the array.
@ignore
@param {Object} searchElement
@param {Number} fromIndex
@return {Number} Returns index of element if found; -1 otherwise. | indexOf | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function merge(obj1, obj2)
{
var result = {}, name;
for (name in obj1)
result[name] = obj1[name];
for (name in obj2)
result[name] = obj2[name];
return result;
} | Merges two objects. Values from obj2 override values in obj1.
Function is NOT recursive and works only for one dimensional objects.
@param {Object} obj1 First object.
@param {Object} obj2 Second object.
@return {Object} Returns combination of both objects. | merge | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function toBoolean(value)
{
var result = { "true" : true, "false" : false }[value];
return result == null ? value : result;
} | Attempts to convert string to boolean.
@param {String} value Input string.
@return {Boolean} Returns true if input was "true", false if input was "false" and value otherwise. | toBoolean | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function popup(url, name, width, height, options)
{
var x = (screen.width - width) / 2,
y = (screen.height - height) / 2
;
options += ', left=' + x +
', top=' + y +
', width=' + width +
', height=' + height
;
options = opti... | Opens up a centered popup window.
@param {String} url URL to open in the window.
@param {String} name Popup name.
@param {int} width Popup width.
@param {int} height Popup height.
@param {String} options window.open() options.
@return {Window} Returns window instance. | popup | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function attachEvent(obj, type, func, scope)
{
function handler(e)
{
e = e || window.event;
if (!e.target)
{
e.target = e.srcElement;
e.preventDefault = function()
{
this.returnValue = false;
... | Adds event handler to the target object.
@param {Object} obj Target object.
@param {String} type Name of the event.
@param {Function} func Handling function. | attachEvent | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function handler(e)
{
e = e || window.event;
if (!e.target)
{
e.target = e.srcElement;
e.preventDefault = function()
{
this.returnValue = false;
};
}
func.call(scope ... | Adds event handler to the target object.
@param {Object} obj Target object.
@param {String} type Name of the event.
@param {Function} func Handling function. | handler | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function alert(str)
{
window.alert(sh.config.strings.alert + str);
} | Displays an alert.
@param {String} str String to display. | alert | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function findBrush(alias, showAlert)
{
var brushes = sh.vars.discoveredBrushes,
result = null
;
if (brushes == null)
{
brushes = {};
// Find all brushes
for (var brush in sh.brushes)
{
var info = sh.bru... | Finds a brush by its alias.
@param {String} alias Brush alias.
@param {Boolean} showAlert Suppresses the alert if false.
@return {Brush} Returns bursh constructor if found, null otherwise. | findBrush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function eachLine(str, callback)
{
var lines = splitLines(str);
for (var i = 0; i < lines.length; i++)
lines[i] = callback(lines[i], i);
// include \r to enable copy-paste on windows (ie8) without getting everything on one line
return lines.join('\r\n');
} | Executes a callback on each line and replaces each line with result from the callback.
@param {Object} str Input string.
@param {Object} callback Callback function taking one string argument and returning a string. | eachLine | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function trimFirstAndLastLines(str)
{
return str.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g, '');
} | This is a special trim which only removes first and last empty lines
and doesn't affect valid leading space on the first line.
@param {String} str Input string
@return {String} Returns string without empty first and last lines. | trimFirstAndLastLines | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function parseParams(str)
{
var match,
result = {},
arrayRegex = new XRegExp("^\\[(?<values>(.*?))\\]$"),
regex = new XRegExp(
"(?<name>[\\w-]+)" +
"\\s*:\\s*" +
"(?<value>" +
"[\\w-%#]+|" + // w... | Parses key/value pairs into hash object.
Understands the following formats:
- name: word;
- name: [word, word];
- name: "string";
- name: 'string';
For example:
name1: value; name2: [value, value]; name3: 'value'
@param {String} str Input string.
@return {Object} Returns deserialized object. | parseParams | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function wrapLinesWithCode(str, css)
{
if (str == null || str.length == 0 || str == '\n')
return str;
str = str.replace(/</g, '<');
// Replace two or more sequential spaces with leaving last space untouched.
str = str.replace(/ {2,}/g, function(m)
{
... | Wraps each line of the string into <code/> tag with given style applied to it.
@param {String} str Input string.
@param {String} css Style name to apply to the string.
@return {String} Returns input string with each line surrounded by <span/> tag. | wrapLinesWithCode | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function padNumber(number, length)
{
var result = number.toString();
while (result.length < length)
result = '0' + result;
return result;
} | Pads number with zeros until it's length is the same as given length.
@param {Number} number Number to pad.
@param {Number} length Max string length with.
@return {String} Returns a string padded with proper amount of '0'. | padNumber | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function processTabs(code, tabSize)
{
var tab = '';
for (var i = 0; i < tabSize; i++)
tab += ' ';
return code.replace(/\t/g, tab);
} | Replaces tabs with spaces.
@param {String} code Source code.
@param {Number} tabSize Size of the tab.
@return {String} Returns code with all tabs replaces by spaces. | processTabs | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function processSmartTabs(code, tabSize)
{
var lines = splitLines(code),
tab = '\t',
spaces = ''
;
// Create a string with 1000 spaces to copy spaces from...
// It's assumed that there would be no indentation longer than that.
for (var i = 0; i < ... | Replaces tabs with smart spaces.
@param {String} code Code to fix the tabs in.
@param {Number} tabSize Number of spaces in a column.
@return {String} Returns code with all tabs replaces with roper amount of spaces. | processSmartTabs | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function insertSpaces(line, pos, count)
{
return line.substr(0, pos)
+ spaces.substr(0, count)
+ line.substr(pos + 1, line.length) // pos + 1 will get rid of the tab
;
} | Replaces tabs with smart spaces.
@param {String} code Code to fix the tabs in.
@param {Number} tabSize Number of spaces in a column.
@return {String} Returns code with all tabs replaces with roper amount of spaces. | insertSpaces | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function fixInputString(str)
{
var br = /<br\s*\/?>|<br\s*\/?>/gi;
if (sh.config.bloggerMode == true)
str = str.replace(br, '\n');
if (sh.config.stripBrs == true)
str = str.replace(br, '');
return str;
} | Performs various string fixes based on configuration. | fixInputString | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function trim(str)
{
return str.replace(/^\s+|\s+$/g, '');
} | Removes all white space at the begining and end of a string.
@param {String} str String to trim.
@return {String} Returns string without leading and following white space characters. | trim | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function unindent(str)
{
var lines = splitLines(fixInputString(str)),
indents = new Array(),
regex = /^\s*/,
min = 1000
;
// go through every line and check for common number of indents
for (var i = 0; i < lines.length && min > 0; i++)
... | Unindents a block of text by the lowest common indent amount.
@param {String} str Text to unindent.
@return {String} Returns unindented text block. | unindent | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function matchesSortCallback(m1, m2)
{
// sort matches by index first
if(m1.index < m2.index)
return -1;
else if(m1.index > m2.index)
return 1;
else
{
// if index is the same, sort by length
if(m1.length < m2.length)
... | Callback method for Array.sort() which sorts matches by
index position and then by length.
@param {Match} m1 Left object.
@param {Match} m2 Right object.
@return {Number} Returns -1, 0 or -1 as a comparison result. | matchesSortCallback | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getMatches(code, regexInfo)
{
function defaultAdd(match, regexInfo)
{
return match[0];
};
var index = 0,
match = null,
matches = [],
func = regexInfo.func ? regexInfo.func : defaultAdd
;
while((match = reg... | Executes given regular expression on provided code and returns all
matches that are found.
@param {String} code Code to execute regular expression on.
@param {Object} regex Regular expression item info from <code>regexList</code> collection.
@return {Array} Returns a list of Match objects. | getMatches | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function defaultAdd(match, regexInfo)
{
return match[0];
} | Executes given regular expression on provided code and returns all
matches that are found.
@param {String} code Code to execute regular expression on.
@param {Object} regex Regular expression item info from <code>regexList</code> collection.
@return {Array} Returns a list of Match objects. | defaultAdd | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function processUrls(code)
{
var gt = /(.*)((>|<).*)/;
return code.replace(sh.regexLib.url, function(m)
{
var suffix = '',
match = null
;
// We include < and > in the URL for the common cases like <http://google.com>
... | Turns all URLs in the code into <a/> tags.
@param {String} code Input code.
@return {String} Returns code with </a> tags. | processUrls | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getSyntaxHighlighterScriptTags()
{
var tags = document.getElementsByTagName('script'),
result = []
;
for (var i = 0; i < tags.length; i++)
if (tags[i].type == 'syntaxhighlighter')
result.push(tags[i]);
return result;
} | Finds all <SCRIPT TYPE="syntaxhighlighter" /> elementss.
@return {Array} Returns array of all found SyntaxHighlighter tags. | getSyntaxHighlighterScriptTags | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function stripCData(original)
{
var left = '<![CDATA[',
right = ']]>',
// for some reason IE inserts some leading blanks here
copy = trim(original),
changed = false,
leftLength = left.length,
rightLength = right.length
;
... | Strips <![CDATA[]]> from <SCRIPT /> content because it should be used
there in most cases for XHTML compliance.
@param {String} original Input code.
@return {String} Returns code without leading <![CDATA[]]> tags. | stripCData | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function quickCodeHandler(e)
{
var target = e.target,
highlighterDiv = findParentElement(target, '.syntaxhighlighter'),
container = findParentElement(target, '.container'),
textarea = document.createElement('textarea'),
highlighter
;
if (!... | Quick code mouse double click handler. | quickCodeHandler | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function offsetMatches(matches, offset)
{
for (var j = 0; j < matches.length; j++)
matches[j].index += offset;
} | Simulates HTML code with a scripting language embedded.
@param {String} scriptBrushName Brush name of the scripting language. | offsetMatches | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function process(match, info)
{
var code = match.code,
matches = [],
regexList = scriptBrush.regexList,
offset = match.index + match.left.length,
htmlScript = scriptBrush.htmlScript,
result
;
... | Simulates HTML code with a scripting language embedded.
@param {String} scriptBrushName Brush name of the scripting language. | process | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getBrushNameCss(match)
{
var result = match ? (match.brushName || brushName) : brushName;
return result ? result + ' ' : '';
} | Finds all matches in the source code.
@param {String} code Source code to process matches in.
@param {Array} matches Discovered regex matches.
@return {String} Returns formatted HTML with processed mathes. | getBrushNameCss | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Created by Peter Atoria @ http://iAtoria.com
var inits = 'class interface function package';
var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
'decodeURIComponent default delete do dynamic each... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var keywords = 'if fi then elif else for do done until while break continue case esac function return in eq ne ge le';
var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
'cksum clear cmp comm command cp cron crontab csplit cut... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Jen
// http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus
var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' +
'ArrayInsertAt ArrayIsDefined ArrayIsEmpty Arr... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Copyright 2006 Shin, YoungJin
var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
'HENHMETAFILE HFILE HFO... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
'continue decimal default delegate do double else enum event explicit volatile ' +
'extern false finally fixed float for foreach get goto if implicit in int ' +
'interface internal is lock lo... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function fixComments(match, regexInfo)
{
var css = (match[0].indexOf("///") == 0)
? 'color1'
: 'comments'
;
return [new SyntaxHighlighter.Match(match[0], match.index, css)];
} | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | fixComments | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
};
function getValuesCSS(str)
{
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
};
var keywords = 'ascent azimuth background-attachment bac... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
} | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | getKeywordsCSS | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getValuesCSS(str)
{
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
} | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | getValuesCSS | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
'case char class comp const constructor currency destructor div do double ' +
'downto else end except exports extended false file finalization finally ' +
'for function goto if implement... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
this.regexList = [
{ regex: /^\+\+\+ .*$/gm, css: 'color2' }, // new file
{ regex: /^\-\-\- .*$/gm, css: 'color2' }, // old file
{ regex: /^\s.*$/gm, css: 'color1' }, // unchanged
{ regex: /^@@.*@@.*$/gm, css: 'variable' }, // location
{ regex: /^\+.*$/gm, css: 'string' }, // addi... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Jean-Lou Dupont
// http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
// According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
'case catch cond div end fun if l... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Andres Almiray
// http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
var keywords = 'as assert break case catch class continue def default do else extends finally ' +
'if in implements import instanceof interface new package property return switch ' ... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var keywords = 'abstract assert boolean break byte case catch char class const ' +
'continue default do double else enum extends ' +
'false final finally float for goto if implements import ' +
'instanceof int interface long native new null ' +
'package private protected pu... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Patrick Webster
// http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
var datatypes = 'Boolean Byte Character Double Duration '
+ 'Float Integer Long Number Short String Void'
;
var keywords = 'abstract after and as assert at bef... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var keywords = 'break case catch continue ' +
'default delete do else false ' +
'for function if in instanceof ' +
'new null return super switch ' +
'this throw true try typeof var while with'
;
var r = SyntaxHighlighter.regexLib;
this.regexList = [
{ rege... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by David Simmons-Duffin and Marty Kube
var funcs =
'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
'chroot close closedir connect cos crypt defined delete each endgrent ' +
'endhostent endnetent endprotoent endpwent endservent eof exec exist... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var funcs = 'abs acos acosh addcslashes addslashes ' +
'array_change_key_case array_chunk array_combine array_count_values array_diff '+
'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
'array_filter array_flip array_intersect array_intersect_assoc... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Joel 'Jaykul' Bennett, http://PoshCode.org | http://HuddledMasses.org
var keywords = 'while validateset validaterange validatepattern validatelength validatecount ' +
'until trap switch return ref process param parameter in if global: '+
'function foreach for finall... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Gheorghe Milas and Ahmad Sherif
var keywords = 'and assert break class continue def del elif else ' +
'except exec finally for from global if import in is ' +
'lambda not or pass print raise return try yield while';
var funcs = '__import__ abs all any apply ba... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Erik Peterson.
var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
'self super then throw true undef unless until when... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
};
function getValuesCSS(str)
{
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
};
var keywords = 'ascent azimuth background-attachment bac... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
} | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | getKeywordsCSS | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function getValuesCSS(str)
{
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
} | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | getValuesCSS | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
// Contributed by Yegor Jbanov and David Bernard.
var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' +
'override try lazy for var catch throw type extends class while with new final yield abstract ' +
'else do if return protecte... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
'current_user day isnull left lower month nullif replace right ' +
'session_user space substring sum system_user upper user year';
var keywords = 'absolute action add after alter as asc at authorization begi... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' +
'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' +
'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' +
'Date Decimal Declare Default Delegate Dim DirectCast Do Do... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function Brush()
{
function process(match, regexInfo)
{
var constructor = SyntaxHighlighter.Match,
code = match[0],
tag = new XRegExp('(<|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
result = []
;
if (match.attributes != null)
{
var attributes,
regex = new XRegExp... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | Brush | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
function process(match, regexInfo)
{
var constructor = SyntaxHighlighter.Match,
code = match[0],
tag = new XRegExp('(<|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
result = []
;
if (match.attributes != null)
{
var attributes,
regex = new XRegExp('(?<name> [\\w:\\-\\.... | Makes a brush compatible with the `html-script` functionality.
@param {Object} regexGroup Object containing `left` and `right` regular expressions. | process | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/SyntaxHighlighter/shCore.js | MIT |
vjs = function(id, options, ready){
var tag; // Element of ID
// Allow for element or ID to be passed in
// String ID
if (typeof id === 'string') {
// Adjust for jQuery ID syntax
if (id.indexOf('#') === 0) {
id = id.slice(1);
}
// If a player instance has already been created for this I... | Doubles as the main function for users to create a player instance and also
the main library object.
**ALIASES** videojs, _V_ (deprecated)
The `vjs` function can be used to initialize or retrieve a player.
var myPlayer = vjs('my_video_id');
@param {String|Element} id Video element or video element ID
@par... | vjs | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/video-js/video.dev.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/video-js/video.dev.js | MIT |
removeType = function(t){
data.handlers[t] = [];
vjs.cleanUpEvents(elem,t);
} | Removes event listeners from an element
@param {Element|Object} elem Object to remove listeners from
@param {String=} type Type of listener to remove. Don't include to remove all events from element.
@param {Function} fn Specific listener to remove. Don't incldue to remove listeners for an event type.
@private | removeType | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/video-js/video.dev.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/video-js/video.dev.js | MIT |
func = function(){
vjs.off(elem, type, func);
fn.apply(this, arguments);
} | Trigger a listener only once for an event
@param {Element|Object} elem Element or object to
@param {String} type
@param {Function} fn
@private | func | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/video-js/video.dev.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/video-js/video.dev.js | MIT |
ret = function() {
return fn.apply(context, arguments);
} | Bind (a.k.a proxy or Context). A simple method for changing the context of a function
It also stores a unique id on the function so it can be easily removed from events
@param {*} context The object to bind as scope
@param {Function} fn The function to be bound to a scope
@param {Number=} uid An opti... | ret | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/video-js/video.dev.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/video-js/video.dev.js | MIT |
tempAdd = function(){
// Set property name on player. Could cause conflicts with other prop names, but it's worth making refs easy.
self[name] = self.addChild(name, opts);
} | Add and initialize default child components from options
// when an instance of MyComponent is created, all children in options
// will be added to the instance by their name strings and options
MyComponent.prototype.options_.children = {
myChildComponent: {
myChildOption: true
}
} | tempAdd | javascript | gongfuxiang/shopxo | public/static/common/lib/ueditor/third-party/video-js/video.dev.js | https://github.com/gongfuxiang/shopxo/blob/master/public/static/common/lib/ueditor/third-party/video-js/video.dev.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.