add: symbol and text color, background color adapter for input method enhance bar
This commit is contained in:
@@ -9,8 +9,8 @@ android {
|
|||||||
applicationId "com.stardust.scriptdroid"
|
applicationId "com.stardust.scriptdroid"
|
||||||
minSdkVersion 17
|
minSdkVersion 17
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 204
|
versionCode 205
|
||||||
versionName "3.0.0 Alpha5"
|
versionName "3.0.0 Alpha6"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
ndk {
|
ndk {
|
||||||
|
|||||||
338
app/src/main/assets/editor/codemirror/addon/autojs/autojs.js
vendored
Normal file
338
app/src/main/assets/editor/codemirror/addon/autojs/autojs.js
vendored
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
function autoJsGlobalScope(){
|
||||||
|
var globals = {
|
||||||
|
"modules": [
|
||||||
|
"app",
|
||||||
|
"automator",
|
||||||
|
"console",
|
||||||
|
"dialogs",
|
||||||
|
"events",
|
||||||
|
"images",
|
||||||
|
"files",
|
||||||
|
"timers",
|
||||||
|
"ui",
|
||||||
|
],
|
||||||
|
"app": [
|
||||||
|
"launchPackage",
|
||||||
|
"launch",
|
||||||
|
"launchApp",
|
||||||
|
"getPackageName",
|
||||||
|
"openAppSetting"
|
||||||
|
],
|
||||||
|
"automator": [
|
||||||
|
"click",
|
||||||
|
"longClick",
|
||||||
|
"press",
|
||||||
|
"swipe",
|
||||||
|
"gesture",
|
||||||
|
"gestures",
|
||||||
|
"gestureAsync",
|
||||||
|
"gesturesAsync",
|
||||||
|
"scrollDown",
|
||||||
|
"scrollUp",
|
||||||
|
"input",
|
||||||
|
"setText"
|
||||||
|
],
|
||||||
|
"console": [
|
||||||
|
"print",
|
||||||
|
"log",
|
||||||
|
"err",
|
||||||
|
"openConsole",
|
||||||
|
"clearConsole"
|
||||||
|
],
|
||||||
|
"dialogs": [
|
||||||
|
"rawInput",
|
||||||
|
"input",
|
||||||
|
"alert",
|
||||||
|
"confirm",
|
||||||
|
"prompt"
|
||||||
|
],
|
||||||
|
"images": [
|
||||||
|
"requestScreenCapture",
|
||||||
|
"captureScreen",
|
||||||
|
"findColor",
|
||||||
|
"findColorInRegion",
|
||||||
|
"findColorEquals"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"open"
|
||||||
|
],
|
||||||
|
"selector": [
|
||||||
|
"id",
|
||||||
|
"idContains",
|
||||||
|
"idStartsWith",
|
||||||
|
"idEndsWith",
|
||||||
|
"idMatches",
|
||||||
|
"text",
|
||||||
|
"textContains",
|
||||||
|
"textStartsWith",
|
||||||
|
"textEndsWith",
|
||||||
|
"textMatches",
|
||||||
|
"desc",
|
||||||
|
"descContains",
|
||||||
|
"descStartsWith",
|
||||||
|
"descEndsWith",
|
||||||
|
"descMatches",
|
||||||
|
"className",
|
||||||
|
"classNameContains",
|
||||||
|
"classNameStartsWith",
|
||||||
|
"classNameEndsWith",
|
||||||
|
"classNameMatches",
|
||||||
|
"packageName",
|
||||||
|
"packageNameContains",
|
||||||
|
"packageNameStartsWith",
|
||||||
|
"packageNameEndsWith",
|
||||||
|
"packageNameMatches",
|
||||||
|
"bounds",
|
||||||
|
"boundsInside",
|
||||||
|
"boundsContains",
|
||||||
|
"drawingOrder",
|
||||||
|
"checkable",
|
||||||
|
"checked",
|
||||||
|
"focusable",
|
||||||
|
"focused",
|
||||||
|
"visibleToUser",
|
||||||
|
"accessibilityFocused",
|
||||||
|
"selected",
|
||||||
|
"clickable",
|
||||||
|
"longClickable",
|
||||||
|
"enabled",
|
||||||
|
"password",
|
||||||
|
"scrollable",
|
||||||
|
"editable",
|
||||||
|
"contentInvalid",
|
||||||
|
"contextClickable",
|
||||||
|
"multiLine",
|
||||||
|
"dismissable",
|
||||||
|
"checkable",
|
||||||
|
"checked",
|
||||||
|
"focusable",
|
||||||
|
"focused",
|
||||||
|
"visibleToUser",
|
||||||
|
"accessibilityFocused",
|
||||||
|
"selected",
|
||||||
|
"clickable",
|
||||||
|
"longClickable",
|
||||||
|
"enabled",
|
||||||
|
"password",
|
||||||
|
"scrollable",
|
||||||
|
"editable",
|
||||||
|
"contentInvalid",
|
||||||
|
"contextClickable",
|
||||||
|
"multiLine",
|
||||||
|
"dismissable"
|
||||||
|
],
|
||||||
|
"shell": [
|
||||||
|
"SetScreenMetrics",
|
||||||
|
"Tap",
|
||||||
|
"Swipe",
|
||||||
|
"Screencap",
|
||||||
|
"KeyCode",
|
||||||
|
"Home",
|
||||||
|
"Back",
|
||||||
|
"Power",
|
||||||
|
"Up",
|
||||||
|
"Down",
|
||||||
|
"Left",
|
||||||
|
"Right",
|
||||||
|
"OK",
|
||||||
|
"VolumeUp",
|
||||||
|
"VolumeDown",
|
||||||
|
"Menu",
|
||||||
|
"Camera",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
|
"timers": [
|
||||||
|
"loop",
|
||||||
|
"setTimeout",
|
||||||
|
"clearTimeout",
|
||||||
|
"setInterval",
|
||||||
|
"clearInterval",
|
||||||
|
"setImmediate",
|
||||||
|
"clearImmediate"
|
||||||
|
],
|
||||||
|
"web": [
|
||||||
|
"newInjectableWebClient",
|
||||||
|
"newInjectableWebView"
|
||||||
|
],
|
||||||
|
"general": [
|
||||||
|
"toast",
|
||||||
|
"toastLog",
|
||||||
|
"sleep",
|
||||||
|
"isStopped",
|
||||||
|
"notStopped",
|
||||||
|
"exit",
|
||||||
|
"setClip",
|
||||||
|
"getClip",
|
||||||
|
"currentPackage",
|
||||||
|
"currentActivity",
|
||||||
|
"waitForActivity",
|
||||||
|
"waitForPackage",
|
||||||
|
"setScreenMetrics"
|
||||||
|
],
|
||||||
|
"variables": [
|
||||||
|
"context",
|
||||||
|
"activity"
|
||||||
|
]
|
||||||
|
};
|
||||||
|
var modules = {
|
||||||
|
"app": [
|
||||||
|
"uninstall",
|
||||||
|
"viewFile",
|
||||||
|
"editFile",
|
||||||
|
"openUrl",
|
||||||
|
"launchPackage",
|
||||||
|
"launch",
|
||||||
|
"launchApp",
|
||||||
|
"getPackageName",
|
||||||
|
"openAppSetting"
|
||||||
|
],
|
||||||
|
"automator": [
|
||||||
|
"click",
|
||||||
|
"longClick",
|
||||||
|
"press",
|
||||||
|
"swipe",
|
||||||
|
"gesture",
|
||||||
|
"gestures",
|
||||||
|
"gestureAsync",
|
||||||
|
"gesturesAsync",
|
||||||
|
"scrollDown",
|
||||||
|
"scrollUp",
|
||||||
|
"input",
|
||||||
|
"setText"
|
||||||
|
],
|
||||||
|
"console": [
|
||||||
|
"show",
|
||||||
|
"hide",
|
||||||
|
"clear",
|
||||||
|
"verbose",
|
||||||
|
"print",
|
||||||
|
"info",
|
||||||
|
"log",
|
||||||
|
"warn",
|
||||||
|
"error",
|
||||||
|
"assert"
|
||||||
|
],
|
||||||
|
"dialogs": [
|
||||||
|
"select",
|
||||||
|
"singleChoice",
|
||||||
|
"multiChoice",
|
||||||
|
"rawInput",
|
||||||
|
"input",
|
||||||
|
"alert",
|
||||||
|
"confirm",
|
||||||
|
"prompt"
|
||||||
|
],
|
||||||
|
"images": [
|
||||||
|
"saveImage",
|
||||||
|
"pixel",
|
||||||
|
"read",
|
||||||
|
"requestScreenCapture",
|
||||||
|
"captureScreen",
|
||||||
|
"findColor",
|
||||||
|
"findColorInRegion",
|
||||||
|
"findColorEquals"
|
||||||
|
],
|
||||||
|
"colors": [
|
||||||
|
"red",
|
||||||
|
"green",
|
||||||
|
"blue",
|
||||||
|
"alpha",
|
||||||
|
"toString",
|
||||||
|
"rgb",
|
||||||
|
"argb"
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
"emitter",
|
||||||
|
"observeKey",
|
||||||
|
"observeTouch",
|
||||||
|
"observeNotification",
|
||||||
|
"onKeyDown",
|
||||||
|
"onKeyUp",
|
||||||
|
"onceKeyDown",
|
||||||
|
"onceKeyUp",
|
||||||
|
"onToast",
|
||||||
|
"onNotification",
|
||||||
|
"removeAllKeyDownListeners",
|
||||||
|
"removeAllKeyUpListeners",
|
||||||
|
"onTouch",
|
||||||
|
"removeAllTouchListeners",
|
||||||
|
"getTouchEventTimeout",
|
||||||
|
"setTouchEventTimeout",
|
||||||
|
"on",
|
||||||
|
"once",
|
||||||
|
"emit",
|
||||||
|
"getListeners",
|
||||||
|
"addListener",
|
||||||
|
"eventNames",
|
||||||
|
"listenerCount",
|
||||||
|
"listeners",
|
||||||
|
"prependListener",
|
||||||
|
"prependOnceListener",
|
||||||
|
"removeAllListeners",
|
||||||
|
"removeAllListeners",
|
||||||
|
"removeListener",
|
||||||
|
"setMaxListeners",
|
||||||
|
"getMaxListeners",
|
||||||
|
"defaultMaxListeners"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"open",
|
||||||
|
"isFile",
|
||||||
|
"isDir",
|
||||||
|
"isEmptyDir",
|
||||||
|
"join",
|
||||||
|
"create",
|
||||||
|
"createIfNotExists",
|
||||||
|
"exists",
|
||||||
|
"ensureDir",
|
||||||
|
"read",
|
||||||
|
"write",
|
||||||
|
"copy",
|
||||||
|
"rename",
|
||||||
|
"renameWithoutExtension",
|
||||||
|
"getName",
|
||||||
|
"getExtension",
|
||||||
|
"remove",
|
||||||
|
"removeDir",
|
||||||
|
"getSdcardPath",
|
||||||
|
"listDir"
|
||||||
|
],
|
||||||
|
"timers": [
|
||||||
|
"loop",
|
||||||
|
"setTimeout",
|
||||||
|
"clearTimeout",
|
||||||
|
"setInterval",
|
||||||
|
"clearInterval",
|
||||||
|
"setImmediate",
|
||||||
|
"clearImmediate"
|
||||||
|
]
|
||||||
|
};
|
||||||
|
function for_each(obj, func){
|
||||||
|
for(var key in obj){
|
||||||
|
if(!obj.hasOwnProperty(key)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
func(key, obj[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var __global__ = {};
|
||||||
|
for_each(modules, function(moduleName, moduleVariables){
|
||||||
|
if(!__global__[moduleName]){
|
||||||
|
__global__[moduleName] = {};
|
||||||
|
}
|
||||||
|
for(var i = 0; i < moduleVariables.length; i++){
|
||||||
|
if(!__global__[moduleName][moduleVariables[i]]){
|
||||||
|
__global__[moduleName][moduleVariables[i]] = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for_each(globals, function(moduleName, moduleVariables){
|
||||||
|
for(var i = 0; i < moduleVariables.length; i++){
|
||||||
|
if(!__global__[moduleVariables[i]]){
|
||||||
|
__global__[moduleVariables[i]] = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return __global__;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -63,8 +63,6 @@
|
|||||||
options);
|
options);
|
||||||
};
|
};
|
||||||
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
|
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
|
||||||
var __global__ = {};
|
|
||||||
regsiterAutoJsObjects();
|
|
||||||
|
|
||||||
function getCoffeeScriptToken(editor, cur) {
|
function getCoffeeScriptToken(editor, cur) {
|
||||||
// This getToken, it is for coffeescript, imitates the behavior of
|
// This getToken, it is for coffeescript, imitates the behavior of
|
||||||
@@ -114,7 +112,6 @@
|
|||||||
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
|
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
|
||||||
}
|
}
|
||||||
function gatherCompletions(obj) {
|
function gatherCompletions(obj) {
|
||||||
console.log("gatherCompletions: ", obj);
|
|
||||||
if (typeof obj == "string") forEach(stringProps, maybeAdd);
|
if (typeof obj == "string") forEach(stringProps, maybeAdd);
|
||||||
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
|
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
|
||||||
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
|
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
|
||||||
@@ -150,342 +147,10 @@
|
|||||||
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
|
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
|
||||||
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
|
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
|
||||||
if (!options || options.useGlobalScope !== false)
|
if (!options || options.useGlobalScope !== false)
|
||||||
gatherCompletions(__global__);
|
gatherCompletions(global);
|
||||||
forEach(keywords, maybeAdd);
|
forEach(keywords, maybeAdd);
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
function regsiterAutoJsObjects(){
|
|
||||||
var objs = {
|
|
||||||
"global": {
|
|
||||||
"modules": [
|
|
||||||
"app",
|
|
||||||
"automator",
|
|
||||||
"console",
|
|
||||||
"dialogs",
|
|
||||||
"events",
|
|
||||||
"images",
|
|
||||||
"files",
|
|
||||||
"timers",
|
|
||||||
"ui"
|
|
||||||
],
|
|
||||||
"app": [
|
|
||||||
"launchPackage",
|
|
||||||
"launch",
|
|
||||||
"launchApp",
|
|
||||||
"getPackageName",
|
|
||||||
"openAppSetting"
|
|
||||||
],
|
|
||||||
"automator": [
|
|
||||||
"click",
|
|
||||||
"longClick",
|
|
||||||
"press",
|
|
||||||
"swipe",
|
|
||||||
"gesture",
|
|
||||||
"gestures",
|
|
||||||
"gestureAsync",
|
|
||||||
"gesturesAsync",
|
|
||||||
"scrollDown",
|
|
||||||
"scrollUp",
|
|
||||||
"input",
|
|
||||||
"setText"
|
|
||||||
],
|
|
||||||
"console": [
|
|
||||||
"print",
|
|
||||||
"log",
|
|
||||||
"err",
|
|
||||||
"openConsole",
|
|
||||||
"clearConsole"
|
|
||||||
],
|
|
||||||
"dialogs": [
|
|
||||||
"rawInput",
|
|
||||||
"input",
|
|
||||||
"alert",
|
|
||||||
"confirm",
|
|
||||||
"prompt"
|
|
||||||
],
|
|
||||||
"images": [
|
|
||||||
"requestScreenCapture",
|
|
||||||
"captureScreen",
|
|
||||||
"findColor",
|
|
||||||
"findColorInRegion",
|
|
||||||
"findColorEquals"
|
|
||||||
],
|
|
||||||
"files": [
|
|
||||||
"open"
|
|
||||||
],
|
|
||||||
"selector": [
|
|
||||||
"id",
|
|
||||||
"idContains",
|
|
||||||
"idStartsWith",
|
|
||||||
"idEndsWith",
|
|
||||||
"idMatches",
|
|
||||||
"text",
|
|
||||||
"textContains",
|
|
||||||
"textStartsWith",
|
|
||||||
"textEndsWith",
|
|
||||||
"textMatches",
|
|
||||||
"desc",
|
|
||||||
"descContains",
|
|
||||||
"descStartsWith",
|
|
||||||
"descEndsWith",
|
|
||||||
"descMatches",
|
|
||||||
"className",
|
|
||||||
"classNameContains",
|
|
||||||
"classNameStartsWith",
|
|
||||||
"classNameEndsWith",
|
|
||||||
"classNameMatches",
|
|
||||||
"packageName",
|
|
||||||
"packageNameContains",
|
|
||||||
"packageNameStartsWith",
|
|
||||||
"packageNameEndsWith",
|
|
||||||
"packageNameMatches",
|
|
||||||
"bounds",
|
|
||||||
"boundsInside",
|
|
||||||
"boundsContains",
|
|
||||||
"drawingOrder",
|
|
||||||
"checkable",
|
|
||||||
"checked",
|
|
||||||
"focusable",
|
|
||||||
"focused",
|
|
||||||
"visibleToUser",
|
|
||||||
"accessibilityFocused",
|
|
||||||
"selected",
|
|
||||||
"clickable",
|
|
||||||
"longClickable",
|
|
||||||
"enabled",
|
|
||||||
"password",
|
|
||||||
"scrollable",
|
|
||||||
"editable",
|
|
||||||
"contentInvalid",
|
|
||||||
"contextClickable",
|
|
||||||
"multiLine",
|
|
||||||
"dismissable",
|
|
||||||
"checkable",
|
|
||||||
"checked",
|
|
||||||
"focusable",
|
|
||||||
"focused",
|
|
||||||
"visibleToUser",
|
|
||||||
"accessibilityFocused",
|
|
||||||
"selected",
|
|
||||||
"clickable",
|
|
||||||
"longClickable",
|
|
||||||
"enabled",
|
|
||||||
"password",
|
|
||||||
"scrollable",
|
|
||||||
"editable",
|
|
||||||
"contentInvalid",
|
|
||||||
"contextClickable",
|
|
||||||
"multiLine",
|
|
||||||
"dismissable"
|
|
||||||
],
|
|
||||||
"shell": [
|
|
||||||
"SetScreenMetrics",
|
|
||||||
"Tap",
|
|
||||||
"Swipe",
|
|
||||||
"Screencap",
|
|
||||||
"KeyCode",
|
|
||||||
"Home",
|
|
||||||
"Back",
|
|
||||||
"Power",
|
|
||||||
"Up",
|
|
||||||
"Down",
|
|
||||||
"Left",
|
|
||||||
"Right",
|
|
||||||
"OK",
|
|
||||||
"VolumeUp",
|
|
||||||
"VolumeDown",
|
|
||||||
"Menu",
|
|
||||||
"Camera",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"timers": [
|
|
||||||
"loop",
|
|
||||||
"setTimeout",
|
|
||||||
"clearTimeout",
|
|
||||||
"setInterval",
|
|
||||||
"clearInterval",
|
|
||||||
"setImmediate",
|
|
||||||
"clearImmediate"
|
|
||||||
],
|
|
||||||
"web": [
|
|
||||||
"newInjectableWebClient",
|
|
||||||
"newInjectableWebView"
|
|
||||||
],
|
|
||||||
"general": [
|
|
||||||
"toast",
|
|
||||||
"toastLog",
|
|
||||||
"sleep",
|
|
||||||
"isStopped",
|
|
||||||
"notStopped",
|
|
||||||
"exit",
|
|
||||||
"setClip",
|
|
||||||
"getClip",
|
|
||||||
"currentPackage",
|
|
||||||
"currentActivity",
|
|
||||||
"waitForActivity",
|
|
||||||
"waitForPackage",
|
|
||||||
"setScreenMetrics"
|
|
||||||
],
|
|
||||||
"variables": [
|
|
||||||
"context",
|
|
||||||
"activity"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"app": [
|
|
||||||
"uninstall",
|
|
||||||
"viewFile",
|
|
||||||
"editFile",
|
|
||||||
"openUrl",
|
|
||||||
"launchPackage",
|
|
||||||
"launch",
|
|
||||||
"launchApp",
|
|
||||||
"getPackageName",
|
|
||||||
"openAppSetting"
|
|
||||||
],
|
|
||||||
"automator": [
|
|
||||||
"click",
|
|
||||||
"longClick",
|
|
||||||
"press",
|
|
||||||
"swipe",
|
|
||||||
"gesture",
|
|
||||||
"gestures",
|
|
||||||
"gestureAsync",
|
|
||||||
"gesturesAsync",
|
|
||||||
"scrollDown",
|
|
||||||
"scrollUp",
|
|
||||||
"input",
|
|
||||||
"setText"
|
|
||||||
],
|
|
||||||
"console": [
|
|
||||||
"show",
|
|
||||||
"hide",
|
|
||||||
"clear",
|
|
||||||
"verbose",
|
|
||||||
"print",
|
|
||||||
"info",
|
|
||||||
"log",
|
|
||||||
"warn",
|
|
||||||
"error",
|
|
||||||
"assert"
|
|
||||||
],
|
|
||||||
"dialogs": [
|
|
||||||
"select",
|
|
||||||
"singleChoice",
|
|
||||||
"multiChoice",
|
|
||||||
"rawInput",
|
|
||||||
"input",
|
|
||||||
"alert",
|
|
||||||
"confirm",
|
|
||||||
"prompt"
|
|
||||||
],
|
|
||||||
"images": [
|
|
||||||
"saveImage",
|
|
||||||
"pixel",
|
|
||||||
"read",
|
|
||||||
"requestScreenCapture",
|
|
||||||
"captureScreen",
|
|
||||||
"findColor",
|
|
||||||
"findColorInRegion",
|
|
||||||
"findColorEquals"
|
|
||||||
],
|
|
||||||
"colors": [
|
|
||||||
"red",
|
|
||||||
"green",
|
|
||||||
"blue",
|
|
||||||
"alpha",
|
|
||||||
"toString",
|
|
||||||
"rgb",
|
|
||||||
"argb"
|
|
||||||
],
|
|
||||||
"events": [
|
|
||||||
"emitter",
|
|
||||||
"observeKey",
|
|
||||||
"observeTouch",
|
|
||||||
"observeNotification",
|
|
||||||
"onKeyDown",
|
|
||||||
"onKeyUp",
|
|
||||||
"onceKeyDown",
|
|
||||||
"onceKeyUp",
|
|
||||||
"onToast",
|
|
||||||
"onNotification",
|
|
||||||
"removeAllKeyDownListeners",
|
|
||||||
"removeAllKeyUpListeners",
|
|
||||||
"onTouch",
|
|
||||||
"removeAllTouchListeners",
|
|
||||||
"getTouchEventTimeout",
|
|
||||||
"setTouchEventTimeout",
|
|
||||||
"on",
|
|
||||||
"once",
|
|
||||||
"emit",
|
|
||||||
"getListeners",
|
|
||||||
"addListener",
|
|
||||||
"eventNames",
|
|
||||||
"listenerCount",
|
|
||||||
"listeners",
|
|
||||||
"prependListener",
|
|
||||||
"prependOnceListener",
|
|
||||||
"removeAllListeners",
|
|
||||||
"removeAllListeners",
|
|
||||||
"removeListener",
|
|
||||||
"setMaxListeners",
|
|
||||||
"getMaxListeners",
|
|
||||||
"defaultMaxListeners"
|
|
||||||
],
|
|
||||||
"files": [
|
|
||||||
"open",
|
|
||||||
"isFile",
|
|
||||||
"isDir",
|
|
||||||
"isEmptyDir",
|
|
||||||
"join",
|
|
||||||
"create",
|
|
||||||
"createIfNotExists",
|
|
||||||
"exists",
|
|
||||||
"ensureDir",
|
|
||||||
"read",
|
|
||||||
"write",
|
|
||||||
"copy",
|
|
||||||
"rename",
|
|
||||||
"renameWithoutExtension",
|
|
||||||
"getName",
|
|
||||||
"getExtension",
|
|
||||||
"remove",
|
|
||||||
"removeDir",
|
|
||||||
"getSdcardPath",
|
|
||||||
"listDir"
|
|
||||||
],
|
|
||||||
"timers": [
|
|
||||||
"loop",
|
|
||||||
"setTimeout",
|
|
||||||
"clearTimeout",
|
|
||||||
"setInterval",
|
|
||||||
"clearInterval",
|
|
||||||
"setImmediate",
|
|
||||||
"clearImmediate"
|
|
||||||
]
|
|
||||||
};
|
|
||||||
for(var key in objs){
|
|
||||||
if(!objs.hasOwnProperty(key)){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(key == "global"){
|
|
||||||
for(var k in objs[key]){
|
|
||||||
if(!objs[key].hasOwnProperty(k)){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
__global__[k] = "";
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var props = objs[key];
|
|
||||||
if(!__global__[key]){
|
|
||||||
__global__[key] = {};
|
|
||||||
}
|
|
||||||
for(var i = 0; i < props.length; i++){
|
|
||||||
if(!__global__[key][props[i]])
|
|
||||||
__global__[key][props[i]] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
this.pick(data, 0);
|
this.pick(data, 0);
|
||||||
} else {
|
} else {
|
||||||
//Modified By Stardust
|
//Modified By Stardust
|
||||||
if(__bridge__){
|
if(typeof __bridge__ != 'undefined'){
|
||||||
__bridge__.updateCodeCompletion(data.from.line, data.from.ch, data.to.line, data.to.ch, data.list);
|
__bridge__.updateCodeCompletion(data.from.line, data.from.ch, data.to.line, data.to.ch, data.list);
|
||||||
}else{
|
}else{
|
||||||
this.widget = new Widget(this, data);
|
this.widget = new Widget(this, data);
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
/* Port of TextMate's Blackboard theme */
|
|
||||||
|
|
||||||
.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
|
|
||||||
.cm-s-blackboard div.CodeMirror-selected { background: #253B76; }
|
|
||||||
.cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); }
|
|
||||||
.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); }
|
|
||||||
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
|
|
||||||
.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
|
|
||||||
.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
|
|
||||||
.cm-s-blackboard .CodeMirror-linenumber { color: #888; }
|
|
||||||
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; }
|
|
||||||
|
|
||||||
.cm-s-blackboard .cm-keyword { color: #FBDE2D; }
|
|
||||||
.cm-s-blackboard .cm-atom { color: #D8FA3C; }
|
|
||||||
.cm-s-blackboard .cm-number { color: #D8FA3C; }
|
|
||||||
.cm-s-blackboard .cm-def { color: #8DA6CE; }
|
|
||||||
.cm-s-blackboard .cm-variable { color: #FF6400; }
|
|
||||||
.cm-s-blackboard .cm-operator { color: #FBDE2D; }
|
|
||||||
.cm-s-blackboard .cm-comment { color: #AEAEAE; }
|
|
||||||
.cm-s-blackboard .cm-string { color: #61CE3C; }
|
|
||||||
.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
|
|
||||||
.cm-s-blackboard .cm-meta { color: #D8FA3C; }
|
|
||||||
.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
|
|
||||||
.cm-s-blackboard .cm-tag { color: #8DA6CE; }
|
|
||||||
.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
|
|
||||||
.cm-s-blackboard .cm-header { color: #FF6400; }
|
|
||||||
.cm-s-blackboard .cm-hr { color: #AEAEAE; }
|
|
||||||
.cm-s-blackboard .cm-link { color: #8DA6CE; }
|
|
||||||
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
|
|
||||||
|
|
||||||
.cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; }
|
|
||||||
.cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
|
|
||||||
.cm-s-cobalt div.CodeMirror-selected { background: #b36539; }
|
|
||||||
.cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
|
|
||||||
.cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
|
|
||||||
.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
|
||||||
.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
|
|
||||||
.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
|
||||||
.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
|
|
||||||
.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
|
|
||||||
.cm-s-cobalt span.cm-comment { color: #08f; }
|
|
||||||
.cm-s-cobalt span.cm-atom { color: #845dc4; }
|
|
||||||
.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }
|
|
||||||
.cm-s-cobalt span.cm-keyword { color: #ffee80; }
|
|
||||||
.cm-s-cobalt span.cm-string { color: #3ad900; }
|
|
||||||
.cm-s-cobalt span.cm-meta { color: #ff9d00; }
|
|
||||||
.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
|
|
||||||
.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def, .cm-s-cobalt .cm-type { color: white; }
|
|
||||||
.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
|
|
||||||
.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
|
|
||||||
.cm-s-cobalt span.cm-link { color: #845dc4; }
|
|
||||||
.cm-s-cobalt span.cm-error { color: #9d1e15; }
|
|
||||||
|
|
||||||
.cm-s-cobalt .CodeMirror-activeline-background { background: #002D57; }
|
|
||||||
.cm-s-cobalt .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
.cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }
|
|
||||||
.cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
|
||||||
.cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }
|
|
||||||
.cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }
|
|
||||||
.cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }
|
|
||||||
.cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
|
|
||||||
.cm-s-colorforth span.cm-comment { color: #ededed; }
|
|
||||||
.cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; }
|
|
||||||
.cm-s-colorforth span.cm-keyword { color: #ffd900; }
|
|
||||||
.cm-s-colorforth span.cm-builtin { color: #00d95a; }
|
|
||||||
.cm-s-colorforth span.cm-variable { color: #73ff00; }
|
|
||||||
.cm-s-colorforth span.cm-string { color: #007bff; }
|
|
||||||
.cm-s-colorforth span.cm-number { color: #00c4ff; }
|
|
||||||
.cm-s-colorforth span.cm-atom { color: #606060; }
|
|
||||||
|
|
||||||
.cm-s-colorforth span.cm-variable-2 { color: #EEE; }
|
|
||||||
.cm-s-colorforth span.cm-variable-3, .cm-s-colorforth span.cm-type { color: #DDD; }
|
|
||||||
.cm-s-colorforth span.cm-property {}
|
|
||||||
.cm-s-colorforth span.cm-operator {}
|
|
||||||
|
|
||||||
.cm-s-colorforth span.cm-meta { color: yellow; }
|
|
||||||
.cm-s-colorforth span.cm-qualifier { color: #FFF700; }
|
|
||||||
.cm-s-colorforth span.cm-bracket { color: #cc7; }
|
|
||||||
.cm-s-colorforth span.cm-tag { color: #FFBD40; }
|
|
||||||
.cm-s-colorforth span.cm-attribute { color: #FFF700; }
|
|
||||||
.cm-s-colorforth span.cm-error { color: #f00; }
|
|
||||||
|
|
||||||
.cm-s-colorforth div.CodeMirror-selected { background: #333d53; }
|
|
||||||
|
|
||||||
.cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }
|
|
||||||
|
|
||||||
.cm-s-colorforth .CodeMirror-activeline-background { background: #253540; }
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; }
|
|
||||||
.cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; }
|
|
||||||
.cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; }
|
|
||||||
.cm-s-elegant span.cm-variable { color: black; }
|
|
||||||
.cm-s-elegant span.cm-variable-2 { color: #b11; }
|
|
||||||
.cm-s-elegant span.cm-qualifier { color: #555; }
|
|
||||||
.cm-s-elegant span.cm-keyword { color: #730; }
|
|
||||||
.cm-s-elegant span.cm-builtin { color: #30a; }
|
|
||||||
.cm-s-elegant span.cm-link { color: #762; }
|
|
||||||
.cm-s-elegant span.cm-error { background-color: #fdd; }
|
|
||||||
|
|
||||||
.cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; }
|
|
||||||
.cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
|
|
||||||
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539; }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-line::selection, .cm-s-erlang-dark .CodeMirror-line > span::selection, .cm-s-erlang-dark .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-line::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
|
|
||||||
.cm-s-erlang-dark span.cm-quote { color: #ccc; }
|
|
||||||
.cm-s-erlang-dark span.cm-atom { color: #f133f1; }
|
|
||||||
.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; }
|
|
||||||
.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; }
|
|
||||||
.cm-s-erlang-dark span.cm-builtin { color: #eaa; }
|
|
||||||
.cm-s-erlang-dark span.cm-comment { color: #77f; }
|
|
||||||
.cm-s-erlang-dark span.cm-def { color: #e7a; }
|
|
||||||
.cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
|
|
||||||
.cm-s-erlang-dark span.cm-meta { color: #50fefe; }
|
|
||||||
.cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
|
|
||||||
.cm-s-erlang-dark span.cm-operator { color: #d55; }
|
|
||||||
.cm-s-erlang-dark span.cm-property { color: #ccc; }
|
|
||||||
.cm-s-erlang-dark span.cm-qualifier { color: #ccc; }
|
|
||||||
.cm-s-erlang-dark span.cm-special { color: #ffbbbb; }
|
|
||||||
.cm-s-erlang-dark span.cm-string { color: #3ad900; }
|
|
||||||
.cm-s-erlang-dark span.cm-string-2 { color: #ccc; }
|
|
||||||
.cm-s-erlang-dark span.cm-tag { color: #9effff; }
|
|
||||||
.cm-s-erlang-dark span.cm-variable { color: #50fe50; }
|
|
||||||
.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
|
|
||||||
.cm-s-erlang-dark span.cm-variable-3, .cm-s-erlang-dark span.cm-type { color: #ccc; }
|
|
||||||
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
|
|
||||||
|
|
||||||
.cm-s-erlang-dark .CodeMirror-activeline-background { background: #013461; }
|
|
||||||
.cm-s-erlang-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Name: Hopscotch
|
|
||||||
Author: Jan T. Sott
|
|
||||||
|
|
||||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
|
||||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
.cm-s-hopscotch.CodeMirror {background: #322931; color: #d5d3d5;}
|
|
||||||
.cm-s-hopscotch div.CodeMirror-selected {background: #433b42 !important;}
|
|
||||||
.cm-s-hopscotch .CodeMirror-gutters {background: #322931; border-right: 0px;}
|
|
||||||
.cm-s-hopscotch .CodeMirror-linenumber {color: #797379;}
|
|
||||||
.cm-s-hopscotch .CodeMirror-cursor {border-left: 1px solid #989498 !important;}
|
|
||||||
|
|
||||||
.cm-s-hopscotch span.cm-comment {color: #b33508;}
|
|
||||||
.cm-s-hopscotch span.cm-atom {color: #c85e7c;}
|
|
||||||
.cm-s-hopscotch span.cm-number {color: #c85e7c;}
|
|
||||||
|
|
||||||
.cm-s-hopscotch span.cm-property, .cm-s-hopscotch span.cm-attribute {color: #8fc13e;}
|
|
||||||
.cm-s-hopscotch span.cm-keyword {color: #dd464c;}
|
|
||||||
.cm-s-hopscotch span.cm-string {color: #fdcc59;}
|
|
||||||
|
|
||||||
.cm-s-hopscotch span.cm-variable {color: #8fc13e;}
|
|
||||||
.cm-s-hopscotch span.cm-variable-2 {color: #1290bf;}
|
|
||||||
.cm-s-hopscotch span.cm-def {color: #fd8b19;}
|
|
||||||
.cm-s-hopscotch span.cm-error {background: #dd464c; color: #989498;}
|
|
||||||
.cm-s-hopscotch span.cm-bracket {color: #d5d3d5;}
|
|
||||||
.cm-s-hopscotch span.cm-tag {color: #dd464c;}
|
|
||||||
.cm-s-hopscotch span.cm-link {color: #c85e7c;}
|
|
||||||
|
|
||||||
.cm-s-hopscotch .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
|
||||||
.cm-s-hopscotch .CodeMirror-activeline-background { background: #302020; }
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Name: Isotope
|
|
||||||
Author: David Desandro / Jan T. Sott
|
|
||||||
|
|
||||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
|
||||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
.cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;}
|
|
||||||
.cm-s-isotope div.CodeMirror-selected {background: #404040 !important;}
|
|
||||||
.cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;}
|
|
||||||
.cm-s-isotope .CodeMirror-linenumber {color: #808080;}
|
|
||||||
.cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;}
|
|
||||||
|
|
||||||
.cm-s-isotope span.cm-comment {color: #3300ff;}
|
|
||||||
.cm-s-isotope span.cm-atom {color: #cc00ff;}
|
|
||||||
.cm-s-isotope span.cm-number {color: #cc00ff;}
|
|
||||||
|
|
||||||
.cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;}
|
|
||||||
.cm-s-isotope span.cm-keyword {color: #ff0000;}
|
|
||||||
.cm-s-isotope span.cm-string {color: #ff0099;}
|
|
||||||
|
|
||||||
.cm-s-isotope span.cm-variable {color: #33ff00;}
|
|
||||||
.cm-s-isotope span.cm-variable-2 {color: #0066ff;}
|
|
||||||
.cm-s-isotope span.cm-def {color: #ff9900;}
|
|
||||||
.cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;}
|
|
||||||
.cm-s-isotope span.cm-bracket {color: #e0e0e0;}
|
|
||||||
.cm-s-isotope span.cm-tag {color: #ff0000;}
|
|
||||||
.cm-s-isotope span.cm-link {color: #cc00ff;}
|
|
||||||
|
|
||||||
.cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
|
||||||
.cm-s-isotope .CodeMirror-activeline-background { background: #202020; }
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
http://lesscss.org/ dark theme
|
|
||||||
Ported to CodeMirror by Peter Kroon
|
|
||||||
*/
|
|
||||||
.cm-s-lesser-dark {
|
|
||||||
line-height: 1.3em;
|
|
||||||
}
|
|
||||||
.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
|
|
||||||
.cm-s-lesser-dark div.CodeMirror-selected { background: #45443B; } /* 33322B*/
|
|
||||||
.cm-s-lesser-dark .CodeMirror-line::selection, .cm-s-lesser-dark .CodeMirror-line > span::selection, .cm-s-lesser-dark .CodeMirror-line > span > span::selection { background: rgba(69, 68, 59, .99); }
|
|
||||||
.cm-s-lesser-dark .CodeMirror-line::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(69, 68, 59, .99); }
|
|
||||||
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
|
|
||||||
|
|
||||||
.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
|
||||||
|
|
||||||
.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
|
|
||||||
.cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; }
|
|
||||||
.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }
|
|
||||||
.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
|
|
||||||
|
|
||||||
.cm-s-lesser-dark span.cm-header { color: #a0a; }
|
|
||||||
.cm-s-lesser-dark span.cm-quote { color: #090; }
|
|
||||||
.cm-s-lesser-dark span.cm-keyword { color: #599eff; }
|
|
||||||
.cm-s-lesser-dark span.cm-atom { color: #C2B470; }
|
|
||||||
.cm-s-lesser-dark span.cm-number { color: #B35E4D; }
|
|
||||||
.cm-s-lesser-dark span.cm-def { color: white; }
|
|
||||||
.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }
|
|
||||||
.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }
|
|
||||||
.cm-s-lesser-dark span.cm-variable-3, .cm-s-lesser-dark span.cm-type { color: white; }
|
|
||||||
.cm-s-lesser-dark span.cm-property { color: #92A75C; }
|
|
||||||
.cm-s-lesser-dark span.cm-operator { color: #92A75C; }
|
|
||||||
.cm-s-lesser-dark span.cm-comment { color: #666; }
|
|
||||||
.cm-s-lesser-dark span.cm-string { color: #BCD279; }
|
|
||||||
.cm-s-lesser-dark span.cm-string-2 { color: #f50; }
|
|
||||||
.cm-s-lesser-dark span.cm-meta { color: #738C73; }
|
|
||||||
.cm-s-lesser-dark span.cm-qualifier { color: #555; }
|
|
||||||
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
|
|
||||||
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
|
|
||||||
.cm-s-lesser-dark span.cm-tag { color: #669199; }
|
|
||||||
.cm-s-lesser-dark span.cm-attribute { color: #00c; }
|
|
||||||
.cm-s-lesser-dark span.cm-hr { color: #999; }
|
|
||||||
.cm-s-lesser-dark span.cm-link { color: #00c; }
|
|
||||||
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
|
|
||||||
|
|
||||||
.cm-s-lesser-dark .CodeMirror-activeline-background { background: #3C3A3A; }
|
|
||||||
.cm-s-lesser-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
.cm-s-liquibyte.CodeMirror {
|
|
||||||
background-color: #000;
|
|
||||||
color: #fff;
|
|
||||||
line-height: 1.2em;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte .CodeMirror-focused .cm-matchhighlight {
|
|
||||||
text-decoration: underline;
|
|
||||||
text-decoration-color: #0f0;
|
|
||||||
text-decoration-style: wavy;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte .cm-trailingspace {
|
|
||||||
text-decoration: line-through;
|
|
||||||
text-decoration-color: #f00;
|
|
||||||
text-decoration-style: dotted;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte .cm-tab {
|
|
||||||
text-decoration: line-through;
|
|
||||||
text-decoration-color: #404040;
|
|
||||||
text-decoration-style: dotted;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; }
|
|
||||||
.cm-s-liquibyte .CodeMirror-gutter-elt div { font-size: 1.2em; }
|
|
||||||
.cm-s-liquibyte .CodeMirror-guttermarker { }
|
|
||||||
.cm-s-liquibyte .CodeMirror-guttermarker-subtle { }
|
|
||||||
.cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0; }
|
|
||||||
.cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee; }
|
|
||||||
|
|
||||||
.cm-s-liquibyte span.cm-comment { color: #008000; }
|
|
||||||
.cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-string { color: #ff8000; }
|
|
||||||
.cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; }
|
|
||||||
|
|
||||||
.cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-variable-3, .cm-s-liquibyte span.cm-type { color: #c080ff; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-operator { color: #fff; }
|
|
||||||
|
|
||||||
.cm-s-liquibyte span.cm-meta { color: #0f0; }
|
|
||||||
.cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-bracket { color: #cc7; }
|
|
||||||
.cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte span.cm-error { color: #f00; }
|
|
||||||
|
|
||||||
.cm-s-liquibyte div.CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25); }
|
|
||||||
|
|
||||||
.cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); }
|
|
||||||
|
|
||||||
.cm-s-liquibyte .CodeMirror-activeline-background { background-color: rgba(0, 255, 0, 0.15); }
|
|
||||||
|
|
||||||
/* Default styles for common addons */
|
|
||||||
.cm-s-liquibyte .CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; }
|
|
||||||
.cm-s-liquibyte .CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; }
|
|
||||||
.CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); }
|
|
||||||
/* Scrollbars */
|
|
||||||
/* Simple */
|
|
||||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div:hover {
|
|
||||||
background-color: rgba(80, 80, 80, .7);
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div {
|
|
||||||
background-color: rgba(80, 80, 80, .3);
|
|
||||||
border: 1px solid #404040;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-simplescroll-vertical div {
|
|
||||||
border-top: 1px solid #404040;
|
|
||||||
border-bottom: 1px solid #404040;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div {
|
|
||||||
border-left: 1px solid #404040;
|
|
||||||
border-right: 1px solid #404040;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-simplescroll-vertical {
|
|
||||||
background-color: #262626;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal {
|
|
||||||
background-color: #262626;
|
|
||||||
border-top: 1px solid #404040;
|
|
||||||
}
|
|
||||||
/* Overlay */
|
|
||||||
.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div {
|
|
||||||
background-color: #404040;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-overlayscroll-vertical div {
|
|
||||||
border: 1px solid #404040;
|
|
||||||
}
|
|
||||||
.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div {
|
|
||||||
border: 1px solid #404040;
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
|
|
||||||
|
|
||||||
/*<!--match-->*/
|
|
||||||
.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; }
|
|
||||||
.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
|
|
||||||
|
|
||||||
/*<!--activeline-->*/
|
|
||||||
.cm-s-midnight .CodeMirror-activeline-background { background: #253540; }
|
|
||||||
|
|
||||||
.cm-s-midnight.CodeMirror {
|
|
||||||
background: #0F192A;
|
|
||||||
color: #D1EDFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-s-midnight div.CodeMirror-selected { background: #314D67; }
|
|
||||||
.cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); }
|
|
||||||
.cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); }
|
|
||||||
.cm-s-midnight .CodeMirror-gutters { background: #0F192A; border-right: 1px solid; }
|
|
||||||
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
|
|
||||||
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
|
||||||
.cm-s-midnight .CodeMirror-linenumber { color: #D0D0D0; }
|
|
||||||
.cm-s-midnight .CodeMirror-cursor { border-left: 1px solid #F8F8F0; }
|
|
||||||
|
|
||||||
.cm-s-midnight span.cm-comment { color: #428BDD; }
|
|
||||||
.cm-s-midnight span.cm-atom { color: #AE81FF; }
|
|
||||||
.cm-s-midnight span.cm-number { color: #D1EDFF; }
|
|
||||||
|
|
||||||
.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute { color: #A6E22E; }
|
|
||||||
.cm-s-midnight span.cm-keyword { color: #E83737; }
|
|
||||||
.cm-s-midnight span.cm-string { color: #1DC116; }
|
|
||||||
|
|
||||||
.cm-s-midnight span.cm-variable { color: #FFAA3E; }
|
|
||||||
.cm-s-midnight span.cm-variable-2 { color: #FFAA3E; }
|
|
||||||
.cm-s-midnight span.cm-def { color: #4DD; }
|
|
||||||
.cm-s-midnight span.cm-bracket { color: #D1EDFF; }
|
|
||||||
.cm-s-midnight span.cm-tag { color: #449; }
|
|
||||||
.cm-s-midnight span.cm-link { color: #AE81FF; }
|
|
||||||
.cm-s-midnight span.cm-error { background: #F92672; color: #F8F8F0; }
|
|
||||||
|
|
||||||
.cm-s-midnight .CodeMirror-matchingbracket {
|
|
||||||
text-decoration: underline;
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
/* Loosely based on the Midnight Textmate theme */
|
|
||||||
|
|
||||||
.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
|
||||||
.cm-s-night div.CodeMirror-selected { background: #447; }
|
|
||||||
.cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); }
|
|
||||||
.cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); }
|
|
||||||
.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
|
||||||
.cm-s-night .CodeMirror-guttermarker { color: white; }
|
|
||||||
.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
|
|
||||||
.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
|
|
||||||
.cm-s-night .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
|
|
||||||
.cm-s-night span.cm-comment { color: #8900d1; }
|
|
||||||
.cm-s-night span.cm-atom { color: #845dc4; }
|
|
||||||
.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }
|
|
||||||
.cm-s-night span.cm-keyword { color: #599eff; }
|
|
||||||
.cm-s-night span.cm-string { color: #37f14a; }
|
|
||||||
.cm-s-night span.cm-meta { color: #7678e2; }
|
|
||||||
.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
|
|
||||||
.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def, .cm-s-night span.cm-type { color: white; }
|
|
||||||
.cm-s-night span.cm-bracket { color: #8da6ce; }
|
|
||||||
.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
|
|
||||||
.cm-s-night span.cm-link { color: #845dc4; }
|
|
||||||
.cm-s-night span.cm-error { color: #9d1e15; }
|
|
||||||
|
|
||||||
.cm-s-night .CodeMirror-activeline-background { background: #1C005A; }
|
|
||||||
.cm-s-night .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/* Taken from the popular Visual Studio Vibrant Ink Schema */
|
|
||||||
|
|
||||||
.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
|
|
||||||
.cm-s-vibrant-ink div.CodeMirror-selected { background: #35493c; }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); }
|
|
||||||
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
|
|
||||||
.cm-s-vibrant-ink .cm-keyword { color: #CC7832; }
|
|
||||||
.cm-s-vibrant-ink .cm-atom { color: #FC0; }
|
|
||||||
.cm-s-vibrant-ink .cm-number { color: #FFEE98; }
|
|
||||||
.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
|
|
||||||
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D; }
|
|
||||||
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def, .cm-s-vibrant span.cm-type { color: #FFC66D; }
|
|
||||||
.cm-s-vibrant-ink .cm-operator { color: #888; }
|
|
||||||
.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
|
|
||||||
.cm-s-vibrant-ink .cm-string { color: #A5C25C; }
|
|
||||||
.cm-s-vibrant-ink .cm-string-2 { color: red; }
|
|
||||||
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
|
|
||||||
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
|
|
||||||
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
|
|
||||||
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
|
|
||||||
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
|
|
||||||
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
|
|
||||||
.cm-s-vibrant-ink .cm-link { color: blue; }
|
|
||||||
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
|
|
||||||
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-activeline-background { background: #27282E; }
|
|
||||||
.cm-s-vibrant-ink .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (C) 2011 by MarkLogic Corporation
|
|
||||||
Author: Mike Brevoort <mike@brevoort.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
|
||||||
.cm-s-xq-dark div.CodeMirror-selected { background: #27007A; }
|
|
||||||
.cm-s-xq-dark .CodeMirror-line::selection, .cm-s-xq-dark .CodeMirror-line > span::selection, .cm-s-xq-dark .CodeMirror-line > span > span::selection { background: rgba(39, 0, 122, 0.99); }
|
|
||||||
.cm-s-xq-dark .CodeMirror-line::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 0, 122, 0.99); }
|
|
||||||
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
|
||||||
.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
|
|
||||||
.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
|
|
||||||
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
|
|
||||||
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
|
||||||
|
|
||||||
.cm-s-xq-dark span.cm-keyword { color: #FFBD40; }
|
|
||||||
.cm-s-xq-dark span.cm-atom { color: #6C8CD5; }
|
|
||||||
.cm-s-xq-dark span.cm-number { color: #164; }
|
|
||||||
.cm-s-xq-dark span.cm-def { color: #FFF; text-decoration:underline; }
|
|
||||||
.cm-s-xq-dark span.cm-variable { color: #FFF; }
|
|
||||||
.cm-s-xq-dark span.cm-variable-2 { color: #EEE; }
|
|
||||||
.cm-s-xq-dark span.cm-variable-3, .cm-s-xq-dark span.cm-type { color: #DDD; }
|
|
||||||
.cm-s-xq-dark span.cm-property {}
|
|
||||||
.cm-s-xq-dark span.cm-operator {}
|
|
||||||
.cm-s-xq-dark span.cm-comment { color: gray; }
|
|
||||||
.cm-s-xq-dark span.cm-string { color: #9FEE00; }
|
|
||||||
.cm-s-xq-dark span.cm-meta { color: yellow; }
|
|
||||||
.cm-s-xq-dark span.cm-qualifier { color: #FFF700; }
|
|
||||||
.cm-s-xq-dark span.cm-builtin { color: #30a; }
|
|
||||||
.cm-s-xq-dark span.cm-bracket { color: #cc7; }
|
|
||||||
.cm-s-xq-dark span.cm-tag { color: #FFBD40; }
|
|
||||||
.cm-s-xq-dark span.cm-attribute { color: #FFF700; }
|
|
||||||
.cm-s-xq-dark span.cm-error { color: #f00; }
|
|
||||||
|
|
||||||
.cm-s-xq-dark .CodeMirror-activeline-background { background: #27282E; }
|
|
||||||
.cm-s-xq-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Name: yeti
|
|
||||||
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
|
||||||
|
|
||||||
Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
.cm-s-yeti.CodeMirror {
|
|
||||||
background-color: #ECEAE8 !important;
|
|
||||||
color: #d1c9c0 !important;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-s-yeti .CodeMirror-gutters {
|
|
||||||
color: #adaba6;
|
|
||||||
background-color: #E5E1DB;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.cm-s-yeti .CodeMirror-cursor { border-left: solid thin #d1c9c0; }
|
|
||||||
.cm-s-yeti .CodeMirror-linenumber { color: #adaba6; }
|
|
||||||
.cm-s-yeti.CodeMirror-focused div.CodeMirror-selected { background: #DCD8D2; }
|
|
||||||
.cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { background: #DCD8D2; }
|
|
||||||
.cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection { background: #DCD8D2; }
|
|
||||||
.cm-s-yeti span.cm-comment { color: #d4c8be; }
|
|
||||||
.cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { color: #96c0d8; }
|
|
||||||
.cm-s-yeti span.cm-number { color: #a074c4; }
|
|
||||||
.cm-s-yeti span.cm-variable { color: #55b5db; }
|
|
||||||
.cm-s-yeti span.cm-variable-2 { color: #a074c4; }
|
|
||||||
.cm-s-yeti span.cm-def { color: #55b5db; }
|
|
||||||
.cm-s-yeti span.cm-operator { color: #9fb96e; }
|
|
||||||
.cm-s-yeti span.cm-keyword { color: #9fb96e; }
|
|
||||||
.cm-s-yeti span.cm-atom { color: #a074c4; }
|
|
||||||
.cm-s-yeti span.cm-meta { color: #96c0d8; }
|
|
||||||
.cm-s-yeti span.cm-tag { color: #96c0d8; }
|
|
||||||
.cm-s-yeti span.cm-attribute { color: #9fb96e; }
|
|
||||||
.cm-s-yeti span.cm-qualifier { color: #96c0d8; }
|
|
||||||
.cm-s-yeti span.cm-property { color: #a074c4; }
|
|
||||||
.cm-s-yeti span.cm-builtin { color: #a074c4; }
|
|
||||||
.cm-s-yeti span.cm-variable-3, .cm-s-yeti span.cm-type { color: #96c0d8; }
|
|
||||||
.cm-s-yeti .CodeMirror-activeline-background { background: #E7E4E0; }
|
|
||||||
.cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline; }
|
|
||||||
@@ -41,6 +41,8 @@
|
|||||||
<script type="text/javascript" src="codemirror/addon/search/search.js"></script>
|
<script type="text/javascript" src="codemirror/addon/search/search.js"></script>
|
||||||
<script type="text/javascript" src="codemirror/addon/search/searchcursor.js"></script>
|
<script type="text/javascript" src="codemirror/addon/search/searchcursor.js"></script>
|
||||||
|
|
||||||
|
<!-- Auto.js -->
|
||||||
|
<script type="text/javascript" src="codemirror/addon/autojs/autojs.js"></script>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>CodeMirrorEditor</title>
|
<title>CodeMirrorEditor</title>
|
||||||
@@ -61,7 +63,10 @@
|
|||||||
theme: 'neo' // 使用neo模版
|
theme: 'neo' // 使用neo模版
|
||||||
});
|
});
|
||||||
editor.setOption("fullScreen", true);
|
editor.setOption("fullScreen", true);
|
||||||
editor.setOption("hintOptions", {completeSingle: false});
|
editor.setOption("hintOptions", {
|
||||||
|
completeSingle: false,
|
||||||
|
globalScope: autoJsGlobalScope()
|
||||||
|
});
|
||||||
editor.on("keyup", function(cm, e) {
|
editor.on("keyup", function(cm, e) {
|
||||||
editor.execCommand("autocomplete")
|
editor.execCommand("autocomplete")
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -56,7 +56,11 @@ public class AccessibilityServiceTool {
|
|||||||
|
|
||||||
public static boolean enableAccessibilityServiceByRoot(Class<? extends android.accessibilityservice.AccessibilityService> accessibilityService) {
|
public static boolean enableAccessibilityServiceByRoot(Class<? extends android.accessibilityservice.AccessibilityService> accessibilityService) {
|
||||||
String serviceName = App.getApp().getPackageName() + "/" + accessibilityService.getName();
|
String serviceName = App.getApp().getPackageName() + "/" + accessibilityService.getName();
|
||||||
return TextUtils.isEmpty(ProcessShell.execCommand(String.format(Locale.getDefault(), cmd, serviceName), true).error);
|
try {
|
||||||
|
return TextUtils.isEmpty(ProcessShell.execCommand(String.format(Locale.getDefault(), cmd, serviceName), true).error);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean enableAccessibilityServiceByRootAndWaitFor(long timeOut) {
|
public static boolean enableAccessibilityServiceByRootAndWaitFor(long timeOut) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import com.afollestad.materialdialogs.MaterialDialog;
|
|||||||
import com.stardust.scriptdroid.R;
|
import com.stardust.scriptdroid.R;
|
||||||
import com.stardust.scriptdroid.script.ScriptFile;
|
import com.stardust.scriptdroid.script.ScriptFile;
|
||||||
import com.stardust.scriptdroid.ui.BaseActivity;
|
import com.stardust.scriptdroid.ui.BaseActivity;
|
||||||
import com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhanceBar;
|
import com.stardust.scriptdroid.ui.edit.completion.CodeCompletionBar;
|
||||||
import com.stardust.theme.dialog.ThemeColorMaterialDialogBuilder;
|
import com.stardust.theme.dialog.ThemeColorMaterialDialogBuilder;
|
||||||
|
|
||||||
import org.androidannotations.annotations.AfterViews;
|
import org.androidannotations.annotations.AfterViews;
|
||||||
@@ -32,9 +32,6 @@ public class EditActivity extends BaseActivity {
|
|||||||
@ViewById(R.id.editor_view)
|
@ViewById(R.id.editor_view)
|
||||||
EditorView mEditor;
|
EditorView mEditor;
|
||||||
|
|
||||||
@ViewById(R.id.input_method_enhance_bar)
|
|
||||||
InputMethodEnhanceBar mInputMethodEnhanceBar;
|
|
||||||
|
|
||||||
private EditorMenu mEditorMenu;
|
private EditorMenu mEditorMenu;
|
||||||
|
|
||||||
public static void editFile(Context context, String path) {
|
public static void editFile(Context context, String path) {
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
import com.stardust.autojs.engine.JavaScriptEngine;
|
import com.stardust.autojs.engine.JavaScriptEngine;
|
||||||
@@ -19,7 +21,9 @@ import com.stardust.pio.PFile;
|
|||||||
import com.stardust.scriptdroid.R;
|
import com.stardust.scriptdroid.R;
|
||||||
import com.stardust.scriptdroid.script.Scripts;
|
import com.stardust.scriptdroid.script.Scripts;
|
||||||
import com.stardust.scriptdroid.ui.edit.completion.CodeCompletions;
|
import com.stardust.scriptdroid.ui.edit.completion.CodeCompletions;
|
||||||
import com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhanceBar;
|
import com.stardust.scriptdroid.ui.edit.completion.CodeCompletionBar;
|
||||||
|
import com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhancedBarColors;
|
||||||
|
import com.stardust.scriptdroid.ui.edit.completion.Symbols;
|
||||||
import com.stardust.widget.ToolbarMenuItem;
|
import com.stardust.widget.ToolbarMenuItem;
|
||||||
import com.stardust.widget.ViewSwitcher;
|
import com.stardust.widget.ViewSwitcher;
|
||||||
|
|
||||||
@@ -54,8 +58,8 @@ public class EditorView extends FrameLayout {
|
|||||||
@ViewById(R.id.editor)
|
@ViewById(R.id.editor)
|
||||||
CodeMirrorEditor mEditor;
|
CodeMirrorEditor mEditor;
|
||||||
|
|
||||||
@ViewById(R.id.input_method_enhance_bar)
|
@ViewById(R.id.code_completion_bar)
|
||||||
InputMethodEnhanceBar mInputMethodEnhanceBar;
|
CodeCompletionBar mCodeCompletionBar;
|
||||||
|
|
||||||
@ViewById(R.id.toolbar_switcher)
|
@ViewById(R.id.toolbar_switcher)
|
||||||
ViewSwitcher mToolbarSwitcher;
|
ViewSwitcher mToolbarSwitcher;
|
||||||
@@ -63,6 +67,12 @@ public class EditorView extends FrameLayout {
|
|||||||
@ViewById(R.id.replace)
|
@ViewById(R.id.replace)
|
||||||
ToolbarMenuItem mReplaceMenuItem;
|
ToolbarMenuItem mReplaceMenuItem;
|
||||||
|
|
||||||
|
@ViewById(R.id.input_method_enhance_bar)
|
||||||
|
View mInputMethodEnhanceBar;
|
||||||
|
|
||||||
|
@ViewById(R.id.symbols)
|
||||||
|
ImageView mSymbols;
|
||||||
|
|
||||||
private static final String KEY_EDITOR_THEME = "我...深爱着...你呀...17.9.28";
|
private static final String KEY_EDITOR_THEME = "我...深爱着...你呀...17.9.28";
|
||||||
|
|
||||||
private String mName;
|
private String mName;
|
||||||
@@ -71,6 +81,8 @@ public class EditorView extends FrameLayout {
|
|||||||
|
|
||||||
private ScriptExecution mScriptExecution;
|
private ScriptExecution mScriptExecution;
|
||||||
private boolean mTextChanged = false;
|
private boolean mTextChanged = false;
|
||||||
|
private CodeCompletions mCodeCompletions;
|
||||||
|
private boolean mSymbolsShown = false;
|
||||||
private BroadcastReceiver mOnRunFinishedReceiver = new BroadcastReceiver() {
|
private BroadcastReceiver mOnRunFinishedReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
@@ -150,10 +162,27 @@ public class EditorView extends FrameLayout {
|
|||||||
@AfterViews
|
@AfterViews
|
||||||
void init() {
|
void init() {
|
||||||
setUpEditor();
|
setUpEditor();
|
||||||
|
setUpInputMethodEnhancedBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setUpInputMethodEnhancedBar() {
|
||||||
|
mCodeCompletionBar.setOnHintClickListener(new CodeCompletionBar.OnHintClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onHintClick(CodeCompletions completions, int pos) {
|
||||||
|
if (completions.shouldBeInserted()) {
|
||||||
|
mEditor.insert(completions.getHints().get(pos));
|
||||||
|
showOrHideSymbols();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mEditor.replace(completions.getHints().get(pos), completions.getFrom().line, completions.getFrom().ch,
|
||||||
|
completions.getTo().line, completions.getTo().ch);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setUpEditor() {
|
private void setUpEditor() {
|
||||||
mEditor.setTheme(PreferenceManager.getDefaultSharedPreferences(getContext())
|
setTheme(PreferenceManager.getDefaultSharedPreferences(getContext())
|
||||||
.getString(KEY_EDITOR_THEME, mEditor.getTheme()));
|
.getString(KEY_EDITOR_THEME, mEditor.getTheme()));
|
||||||
mEditor.setCallback(new CodeMirrorEditor.Callback() {
|
mEditor.setCallback(new CodeMirrorEditor.Callback() {
|
||||||
@Override
|
@Override
|
||||||
@@ -165,23 +194,36 @@ public class EditorView extends FrameLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCodeCompletion(int fromLine, int fromCh, int toLine, int toCh, final String[] list) {
|
public void updateCodeCompletion(int fromLine, int fromCh, int toLine, int toCh, final String[] list) {
|
||||||
mInputMethodEnhanceBar.setCodeCompletions(new CodeCompletions(
|
mCodeCompletionBar.setCodeCompletions(new CodeCompletions(
|
||||||
new CodeCompletions.Pos(fromLine, fromCh),
|
new CodeCompletions.Pos(fromLine, fromCh),
|
||||||
new CodeCompletions.Pos(toLine, toCh),
|
new CodeCompletions.Pos(toLine, toCh),
|
||||||
Arrays.asList(list)
|
Arrays.asList(list)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mInputMethodEnhanceBar.setOnHintClickListener(new InputMethodEnhanceBar.OnHintClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onHintClick(CodeCompletions completions, int pos) {
|
|
||||||
mEditor.replace(completions.getHints().get(pos), completions.getFrom().line, completions.getFrom().ch,
|
|
||||||
completions.getTo().line, completions.getTo().ch);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTheme(String theme) {
|
||||||
|
mEditor.setTheme(theme);
|
||||||
|
mInputMethodEnhanceBar.setBackgroundColor(InputMethodEnhancedBarColors.getBackgroundColor(theme));
|
||||||
|
int textColor = InputMethodEnhancedBarColors.getTextColor(theme);
|
||||||
|
mCodeCompletionBar.setTextColor(textColor);
|
||||||
|
mSymbols.setColorFilter(textColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Click(R.id.symbols)
|
||||||
|
void showOrHideSymbols() {
|
||||||
|
if (mSymbolsShown) {
|
||||||
|
mCodeCompletionBar.setCodeCompletions(mCodeCompletions);
|
||||||
|
mCodeCompletions = null;
|
||||||
|
} else {
|
||||||
|
mCodeCompletions = mCodeCompletionBar.getCodeCompletions();
|
||||||
|
mCodeCompletionBar.setCodeCompletions(Symbols.getSymbols());
|
||||||
|
}
|
||||||
|
mSymbolsShown = !mSymbolsShown;
|
||||||
|
}
|
||||||
|
|
||||||
@Click(R.id.run)
|
@Click(R.id.run)
|
||||||
public void runAndSaveFileIfNeeded() {
|
public void runAndSaveFileIfNeeded() {
|
||||||
@@ -296,7 +338,7 @@ public class EditorView extends FrameLayout {
|
|||||||
PreferenceManager.getDefaultSharedPreferences(getContext()).edit()
|
PreferenceManager.getDefaultSharedPreferences(getContext()).edit()
|
||||||
.putString(KEY_EDITOR_THEME, text.toString())
|
.putString(KEY_EDITOR_THEME, text.toString())
|
||||||
.apply();
|
.apply();
|
||||||
mEditor.setTheme(text.toString());
|
setTheme(text.toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -36,12 +36,13 @@ import java.util.Map;
|
|||||||
* Created by Stardust on 2017/2/17.
|
* Created by Stardust on 2017/2/17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class InputMethodEnhanceBar extends RecyclerView {
|
public class CodeCompletionBar extends RecyclerView {
|
||||||
|
|
||||||
public interface OnHintClickListener {
|
public interface OnHintClickListener {
|
||||||
void onHintClick(CodeCompletions completions, int pos);
|
void onHintClick(CodeCompletions completions, int pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int mTextColor;
|
||||||
private CodeCompletions mCodeCompletions;
|
private CodeCompletions mCodeCompletions;
|
||||||
private OnHintClickListener mOnHintClickListener;
|
private OnHintClickListener mOnHintClickListener;
|
||||||
private final OnClickListener mOnCodeCompletionItemClickListener = new OnClickListener() {
|
private final OnClickListener mOnCodeCompletionItemClickListener = new OnClickListener() {
|
||||||
@@ -69,17 +70,17 @@ public class InputMethodEnhanceBar extends RecyclerView {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public InputMethodEnhanceBar(Context context) {
|
public CodeCompletionBar(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputMethodEnhanceBar(Context context, @Nullable AttributeSet attrs) {
|
public CodeCompletionBar(Context context, @Nullable AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputMethodEnhanceBar(Context context, @Nullable AttributeSet attrs, int defStyle) {
|
public CodeCompletionBar(Context context, @Nullable AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
@@ -93,6 +94,16 @@ public class InputMethodEnhanceBar extends RecyclerView {
|
|||||||
getAdapter().notifyDataSetChanged();
|
getAdapter().notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CodeCompletions getCodeCompletions() {
|
||||||
|
return mCodeCompletions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTextColor(int textColor) {
|
||||||
|
mTextColor = textColor;
|
||||||
|
getAdapter().notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
setAdapter(new CodeCompletionAdapter());
|
setAdapter(new CodeCompletionAdapter());
|
||||||
setLayoutManager(new WrapContentLinearLayoutManager(getContext(), HORIZONTAL, false));
|
setLayoutManager(new WrapContentLinearLayoutManager(getContext(), HORIZONTAL, false));
|
||||||
@@ -107,7 +118,11 @@ public class InputMethodEnhanceBar extends RecyclerView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(ViewHolder holder, int position) {
|
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||||
((TextView) holder.itemView).setText(mCodeCompletions.getHints().get(position));
|
TextView textView = ((TextView) holder.itemView);
|
||||||
|
textView.setText(mCodeCompletions.getHints().get(position));
|
||||||
|
if(mTextColor != 0){
|
||||||
|
textView.setTextColor(mTextColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -28,6 +28,10 @@ public class CodeCompletions {
|
|||||||
mHints = hints;
|
mHints = hints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static CodeCompletions just(List<String> hints) {
|
||||||
|
return new CodeCompletions(null, null, hints);
|
||||||
|
}
|
||||||
|
|
||||||
public Pos getFrom() {
|
public Pos getFrom() {
|
||||||
return mFrom;
|
return mFrom;
|
||||||
}
|
}
|
||||||
@@ -39,4 +43,10 @@ public class CodeCompletions {
|
|||||||
public List<String> getHints() {
|
public List<String> getHints() {
|
||||||
return mHints;
|
return mHints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean shouldBeInserted() {
|
||||||
|
return mFrom == null && mTo == null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package com.stardust.scriptdroid.ui.edit.completion;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
|
||||||
|
import com.stardust.util.MapEntries;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Stardust on 2017/9/28.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class InputMethodEnhancedBarColors {
|
||||||
|
|
||||||
|
private static final Map<String, Integer> sEditorThemeColors = new MapEntries<String, Integer>()
|
||||||
|
.entry("3024-day", 0xf7f7f7)
|
||||||
|
.entry("3024-night", 0x090300)
|
||||||
|
.entry("abcdef", 0x0f0f0f)
|
||||||
|
.entry("ambiance-mobile", 0xffffff)
|
||||||
|
.entry("ambiance", 0xffffff)
|
||||||
|
.entry("base16-dark", 0x151515)
|
||||||
|
.entry("base16-light", 0xf5f5f5)
|
||||||
|
.entry("bespin", 0x28211c)
|
||||||
|
.entry("dracula", 0x282a36)
|
||||||
|
.entry("duotone-dark", 0x2a2734)
|
||||||
|
.entry("duotone-light", 0xfaf8f5)
|
||||||
|
.entry("eclipse", 0xffffff)
|
||||||
|
.entry("icecoder", 0x1d1d1b)
|
||||||
|
.entry("material", 0x263238)
|
||||||
|
.entry("mbo", 0x2c2c2c)
|
||||||
|
.entry("mdn-like", 0xfefefe)
|
||||||
|
.entry("monokai", 0x272822)
|
||||||
|
.entry("neat", 0xffffff)
|
||||||
|
.entry("neo", 0xffffff)
|
||||||
|
.entry("night", 0x0a001f)
|
||||||
|
.entry("panda-syntax", 0x292a2b)
|
||||||
|
.entry("paraiso-dark", 0x2f1e2e)
|
||||||
|
.entry("paraiso-light", 0xe7e9db)
|
||||||
|
.entry("pastel-on-dark", 0x2c2827)
|
||||||
|
.entry("railscasts", 0x2b2b2b)
|
||||||
|
.entry("rubyblue", 0x112435)
|
||||||
|
.entry("seti", 0x151718)
|
||||||
|
.entry("solarized", 0xffffff)
|
||||||
|
.entry("the-matrix", 0x000000)
|
||||||
|
.entry("tomorrow-night-bright", 0x000000)
|
||||||
|
.entry("tomorrow-night-eighties", 0x000000)
|
||||||
|
.entry("ttcn", 0xffffff)
|
||||||
|
.entry("twilight", 0x141414)
|
||||||
|
.entry("xq-light", 0xffffff)
|
||||||
|
.entry("zenburn", 0x3f3f3f)
|
||||||
|
.map();
|
||||||
|
|
||||||
|
public static int getBackgroundColor(String theme) {
|
||||||
|
int themeColor = sEditorThemeColors.get(theme);
|
||||||
|
if (themeColor == 0xffffff) {
|
||||||
|
return 0x828389;
|
||||||
|
}
|
||||||
|
return themeColor | 0xdd000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getTextColor(String theme) {
|
||||||
|
int c = sEditorThemeColors.get(theme);
|
||||||
|
if (isBrightColor(c)) {
|
||||||
|
return Color.BLACK;
|
||||||
|
} else {
|
||||||
|
return Color.WHITE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isBrightColor(int color) {
|
||||||
|
int[] rgb = {Color.red(color), Color.green(color), Color.blue(color)};
|
||||||
|
int brightness = (int) Math.sqrt(rgb[0] * rgb[0] * .241 + rgb[1]
|
||||||
|
* rgb[1] * .691 + rgb[2] * rgb[2] * .068);
|
||||||
|
return brightness >= 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.stardust.scriptdroid.ui.edit.completion;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Stardust on 2017/9/28.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Symbols {
|
||||||
|
|
||||||
|
private static CodeCompletions sSymbols = CodeCompletions.just(Arrays.asList(
|
||||||
|
"=", "\"", "(", ")", "{", "}", ";", "!", "|", "&", "[", "]", "/", "\\",
|
||||||
|
"<", ">"));
|
||||||
|
|
||||||
|
public static CodeCompletions getSymbols() {
|
||||||
|
return sSymbols;
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
app/src/main/res/drawable/ic_ali_symbol.png
Normal file
BIN
app/src/main/res/drawable/ic_ali_symbol.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -114,10 +114,27 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<com.stardust.scriptdroid.ui.edit.completion.InputMethodEnhanceBar
|
<LinearLayout
|
||||||
android:id="@+id/input_method_enhance_bar"
|
android:id="@+id/input_method_enhance_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:background="#77f2f3f7"/>
|
android:background="#77f2f3f7"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/symbols"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:src="@drawable/ic_ali_symbol"
|
||||||
|
android:tint="#222329"/>
|
||||||
|
|
||||||
|
<com.stardust.scriptdroid.ui.edit.completion.CodeCompletionBar
|
||||||
|
android:id="@+id/code_completion_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="35dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/btn_selector"
|
android:background="@drawable/btn_selector"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="12dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="12dp"
|
||||||
android:textColor="@android:color/secondary_text_light"
|
android:textColor="@android:color/secondary_text_light"
|
||||||
android:textSize="16sp"/>
|
android:textSize="16sp"/>
|
||||||
@@ -29,7 +29,11 @@ public class AccessibilityServiceTool {
|
|||||||
|
|
||||||
public static boolean enableAccessibilityServiceByRoot(Context context, Class<? extends AccessibilityService> accessibilityService) {
|
public static boolean enableAccessibilityServiceByRoot(Context context, Class<? extends AccessibilityService> accessibilityService) {
|
||||||
String serviceName = context.getPackageName() + "/" + accessibilityService.getName();
|
String serviceName = context.getPackageName() + "/" + accessibilityService.getName();
|
||||||
return TextUtils.isEmpty(ProcessShell.execCommand(String.format(Locale.getDefault(), cmd, serviceName), true).error);
|
try {
|
||||||
|
return TextUtils.isEmpty(ProcessShell.execCommand(String.format(Locale.getDefault(), cmd, serviceName), true).error);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean enableAccessibilityServiceByRootAndWaitFor(Context context, long timeOut) {
|
public static boolean enableAccessibilityServiceByRootAndWaitFor(Context context, long timeOut) {
|
||||||
|
|||||||
Reference in New Issue
Block a user