go.talks/present: make output resizable only when plugin present
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13604047
diff --git a/present/js/play.js b/present/js/play.js
index fc15ce5..3b8c340 100644
--- a/present/js/play.js
+++ b/present/js/play.js
@@ -26,14 +26,15 @@
var outpre = document.createElement('pre');
var running;
- // TODO(adg): check that jquery etc is loaded.
- $(output).resizable({
- handles: "n,w,nw",
- minHeight: 27,
- minWidth: 135,
- maxHeight: 608,
- maxWidth: 990
- });
+ if ($ && $(output).resizable) {
+ $(output).resizable({
+ handles: "n,w,nw",
+ minHeight: 27,
+ minWidth: 135,
+ maxHeight: 608,
+ maxWidth: 990
+ });
+ }
function onKill() {
if (running) running.Kill();