mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Material goodies for fxos
This commit is contained in:
parent
8e6eaf2f71
commit
e8859baeae
BIN
media/images/rlogo256.png
Normal file
BIN
media/images/rlogo256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
shlr/www/m/images/rlogo256.png
Normal file
BIN
shlr/www/m/images/rlogo256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
@ -26,7 +26,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link rel="icon" sizes="192x192" href="images/touch/chrome-touch-icon-192x192.png">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=false">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=true">
|
||||
<!-- Add to homescreen for Safari on iOS -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
@ -79,10 +79,13 @@
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
|
||||
<!--
|
||||
<li class="mdl-menu__item"><a target=_blank href="./">New Window</a></li>
|
||||
<li onclick="singlePanel()" class="mdl-menu__item">Single Panel</li>
|
||||
<li onclick="hSplit()" class="mdl-menu__item">Horiz Split</li>
|
||||
<li onclick="vSplit()" class="mdl-menu__item">Vert Split</li>
|
||||
-->
|
||||
<li onclick="seek()" class="mdl-menu__item">Seek</li>
|
||||
<li onclick="panelConsole()" class="mdl-menu__item">Console</li>
|
||||
<li onclick="panelSettings()" class="mdl-menu__item">Settings</li>
|
||||
<li onclick="panelAbout()" class="mdl-menu__item">About</li>
|
||||
@ -273,13 +276,6 @@
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
<a href="javascript:seek()" id="view-source" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-color--accent mdl-color-text--accent-contrast">seek</a>
|
||||
<!--
|
||||
<script type="application/javascript;version=1.7" src="material.min.js"></script>
|
||||
<script type="application/javascript;version=1.7" src="r2.js"></script>
|
||||
<script type="application/javascript;version=1.7" src="index.js"></script>
|
||||
<script type="application/javascript;version=1.7" src="beautify.js"></script>
|
||||
-->
|
||||
<script type="application/javascript" src="material.min.js"></script>
|
||||
<script type="application/javascript" src="r2.js"></script>
|
||||
<script type="application/javascript" src="index.js"></script>
|
||||
|
@ -852,6 +852,8 @@ function panelDisasm() {
|
||||
out += uiButton('javascript:rename()', 'Rename');
|
||||
out += uiButton('javascript:write()', 'Write');
|
||||
c.innerHTML = out;
|
||||
c.style['font-size'] = '12px';
|
||||
c.style.overflow = 'scroll';
|
||||
var tail = '';
|
||||
if (inColor) {
|
||||
tail = '@e:scr.color=1,scr.html=1';
|
||||
|
24
shlr/www/m/manifest.webapp
Normal file
24
shlr/www/m/manifest.webapp
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"version" : "0.1",
|
||||
"default_locale" : "en",
|
||||
"type" : "privileged",
|
||||
"name" : "radare2",
|
||||
"developer" : {
|
||||
"name" : "pancake",
|
||||
"url" : "http://github.com/radare/radare2/"
|
||||
},
|
||||
"permissions" : {
|
||||
"systemXHR": {
|
||||
"description": "communicate with remote r2 servers"
|
||||
},
|
||||
"network-http": {},
|
||||
"tcp-socket" : {
|
||||
"description" : "Create TCP sockets and communicate over them."
|
||||
}
|
||||
},
|
||||
"launch_path" : "/index.html",
|
||||
"description" : "",
|
||||
"icons" : {
|
||||
"256" : "/images/rlogo256.png"
|
||||
}
|
||||
}
|
2
shlr/www/m/material.min.js
vendored
2
shlr/www/m/material.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
/* radare2 Copyleft 2013-2014 pancake */
|
||||
/* radare2 Copyleft 2013-2015 pancake */
|
||||
|
||||
var r2 = {};
|
||||
|
||||
@ -10,6 +10,26 @@ var prev_curoff = 0;
|
||||
var prev_lastoff = 0;
|
||||
var hascmd = false;
|
||||
|
||||
function isFirefoxOS() {
|
||||
if (!locationbar.visible) {
|
||||
if (navigator.userAgent.indexOf('Firefox') > -1 && navigator.userAgent.indexOf("Mobile") > -1) {
|
||||
return ("mozApps" in navigator);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Valid options: sync, async or sasync
|
||||
r2.asyncMode = 'sasync';
|
||||
//r2.asyncMode = 'sync';
|
||||
|
||||
if (isFirefoxOS()) {
|
||||
/* Requires CORS or SystemXHR */
|
||||
r2.root = 'http://cloud.radare.org';
|
||||
} else {
|
||||
r2.root = '';
|
||||
}
|
||||
|
||||
// async helper
|
||||
function asyncLoop(iterations, func, callback) {
|
||||
var index = 0;
|
||||
@ -19,7 +39,6 @@ function asyncLoop(iterations, func, callback) {
|
||||
if (done) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (index < iterations) {
|
||||
index++;
|
||||
func(loop);
|
||||
@ -54,10 +73,10 @@ if (typeof (module) !== 'undefined') {
|
||||
}
|
||||
}
|
||||
|
||||
r2.project_name = "";
|
||||
r2.project_name = '';
|
||||
|
||||
r2.plugin = function() {
|
||||
console.error ("r2.plugin is not available in this environment");
|
||||
console.error ('r2.plugin is not available in this environment');
|
||||
}
|
||||
try {
|
||||
if (r2plugin) {
|
||||
@ -65,8 +84,6 @@ try {
|
||||
}
|
||||
} catch ( e ) {}
|
||||
|
||||
r2.root = ""; // prefix path
|
||||
|
||||
/* helpers */
|
||||
function dump(obj) {
|
||||
var x = "";
|
||||
@ -103,21 +120,49 @@ function objtostr(obj) {
|
||||
return str;
|
||||
}
|
||||
|
||||
var ajax_in_process = false;
|
||||
|
||||
function Ajax(method, uri, body, fn) {
|
||||
if (typeof (XMLHttpRequest) == "undefined")
|
||||
if (typeof (XMLHttpRequest) == 'undefined')
|
||||
return false;
|
||||
var x = new XMLHttpRequest ();
|
||||
if (r2.asyncMode == 'fake') {
|
||||
if (fn) {
|
||||
fn ("{}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (r2.asyncMode == 'sasync') {
|
||||
console.log ('async waiting');
|
||||
if (ajax_in_process) {
|
||||
setTimeout(function() {
|
||||
Ajax(method, uri, body, fn);
|
||||
}, 100);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (isFirefoxOS()) {
|
||||
var x = new XMLHttpRequest ({mozSystem: true});
|
||||
} else {
|
||||
var x = new XMLHttpRequest ();
|
||||
}
|
||||
if (!x)
|
||||
return false;
|
||||
x.open (method, uri, false); // SYNC
|
||||
//x.open (method, uri, true); // ASYNC
|
||||
ajax_in_process = true;
|
||||
if (r2.asyncMode == 'sync') {
|
||||
x.open (method, uri, false);
|
||||
} else {
|
||||
x.open (method, uri, true);
|
||||
}
|
||||
x.setRequestHeader ('Accept', 'text/plain');
|
||||
x.setRequestHeader ('Accept', 'text/html');
|
||||
//x.setRequestHeader ('Accept', 'text/html');
|
||||
x.setRequestHeader ("Content-Type", "application/x-ww-form-urlencoded; charset=UTF-8");
|
||||
x.onreadystatechange = function(y) {
|
||||
ajax_in_process = false;
|
||||
if (x.status == 200) {
|
||||
if (fn) {
|
||||
fn (x.responseText);
|
||||
} else {
|
||||
console.error ('missing ajax callback');
|
||||
}
|
||||
} else {
|
||||
console.error ("ajax " + x.status)
|
||||
@ -207,7 +252,7 @@ r2.get_address_type = function(address) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return '';
|
||||
}
|
||||
|
||||
r2.settings = {};
|
||||
|
Loading…
Reference in New Issue
Block a user