fix: Fix the waterfall of blooding words

Close #44
This commit is contained in:
Mattia Astorino 2017-05-18 10:47:25 +02:00
parent 8a5a331fb4
commit 8b62470290
6 changed files with 68 additions and 10 deletions

View file

@ -123,9 +123,9 @@
}
},
{
"name": "Block Level Variables",
"name": "C-related Block Level Variables",
"scope": [
"meta.block variable.other"
"source.cpp meta.block variable.other"
],
"settings": {
"foreground": "{{variant.scheme.base.pink}}"

View file

@ -0,0 +1,58 @@
var parseXML = function (data) {
var xml, tmp;
if (!data || typeof data !== "string") {
return null;
}
try {
if (window.DOMParser) { // Standard
tmp = new DOMParser();
xml = tmp.parseFromString(data, "text/xml");
} else { // IE
xml = new ActiveXObject("Microsoft.XMLDOM");
xml.async = false;
xml.loadXML(data);
}
} catch (e) {
xml = undefined;
}
if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
jQuery.error("Invalid XML: " + data);
}
return xml;
};
// Bind a function to a context, optionally partially applying any arguments.
var proxy = function (fn, context) {
var tmp, args, proxy;
if (typeof context === "string") {
tmp = fn[context];
context = fn;
fn = tmp;
}
// Quick check to determine if target is callable, in the spec
// this throws a TypeError, but we will just return undefined.
if (!jQuery.isFunction(fn)) {
return undefined;
}
// Simulated bind
args = core_slice.call(arguments, 2);
proxy = function () {
return fn.apply(context || this, args.concat(core_slice.call(arguments)));
};
// Set the guid of unique handler to the same of original handler, so it can be removed
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
return proxy;
};
Sound.play = function () { }
Sound.prototype = { something; }
Sound.prototype.play = function () { }
Sound.prototype.play = myfunc
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.hostname; // => "example.com"

View file

@ -123,9 +123,9 @@
}
},
{
"name": "Block Level Variables",
"name": "C-related Block Level Variables",
"scope": [
"meta.block variable.other"
"source.cpp meta.block variable.other"
],
"settings": {
"foreground": "#f07178"

View file

@ -123,9 +123,9 @@
}
},
{
"name": "Block Level Variables",
"name": "C-related Block Level Variables",
"scope": [
"meta.block variable.other"
"source.cpp meta.block variable.other"
],
"settings": {
"foreground": "#f07178"

View file

@ -123,9 +123,9 @@
}
},
{
"name": "Block Level Variables",
"name": "C-related Block Level Variables",
"scope": [
"meta.block variable.other"
"source.cpp meta.block variable.other"
],
"settings": {
"foreground": "#FF5370"

View file

@ -123,9 +123,9 @@
}
},
{
"name": "Block Level Variables",
"name": "C-related Block Level Variables",
"scope": [
"meta.block variable.other"
"source.cpp meta.block variable.other"
],
"settings": {
"foreground": "#f07178"