Commit a94351dc authored by Xiaowu Zhang's avatar Xiaowu Zhang

remove unused function and gadget

parent 1bd101f2
......@@ -41,11 +41,6 @@
.allowPublicAcquisition("setVolume", function (value) {
control.setVolume(value[0]);
})
.allowPublicAcquisition("getVolume", function () {
return control.getVolume().then(function (value) {
return value;
});
})
.allowPublicAcquisition("getFFTValue", function () {
return control.getFFTValue().then(function (value) {
return value;
......@@ -212,7 +207,6 @@
io.removeIO(options.page)
.then(function () {
list.initList(playlist);
// list.display();
});
return;
}
......
......@@ -30,12 +30,6 @@
.declareMethod('getVolume', function () {
return this.volume;
})
.declareMethod('getTitle', function (id) {
if (id === undefined) {
id = this.currentPlayId;
}
return this.playlist[id];
})
.declareMethod('isPaused', function () {
return this.audio.paused;
})
......
<!DOCTYPE html>
<html lang="en">
<head>
<title>show message</title>
<!-- renderjs -->
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<!-- custom script -->
<script src="./log.js" type="text/javascript"></script>
</head>
<body>
<div id = "log"> </div>
</body>
</html>
/*global window, rJS, RSVP, console, document, JSON */
/*jslint maxlen:80, nomen: true */
(function (window, rJS) {
"use strict";
var gk = rJS(window),
logColor = 0,
arrayColor = ["white", "cyan"];
function logGetColor() {
logColor = (logColor + 1) % arrayColor.length;
return arrayColor[logColor];
}
gk.declareMethod('showMessage', function (msg) {
var node = document.createElement("pre");
node.setAttribute(
"style",
"background-color:" + logGetColor() +
";margin:0;padding:0;"
);
if (typeof msg === "string") {
node.textContent += msg;
} else {
node.textContent += JSON.stringify(msg, null, " ");
}
this.log.appendChild(node);
})
.declareMethod('clear', function () {
this.log.innerHTML = "";
});
gk.ready(function (g) {
g.log = g.__element.getElementsByTagName('div')[0];
});
}(window, rJS));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment