diff --git a/static/index.html b/static/index.html
index 34adb3d..5b16823 100644
--- a/static/index.html
+++ b/static/index.html
@@ -4,6 +4,7 @@
hastebin
+
@@ -33,7 +34,38 @@
$(function() {
app = new haste('hastebin', { twitter: true });
handlePop({ target: window });
+ responsive();
});
+
+ function responsive() {
+ // apply touch device specific style
+ if ("ontouchstart" in document.documentElement) {
+ var mTextAreaStyle = document.createElement('style');
+ mTextAreaStyle.setAttribute('rel', 'stylesheet')
+ mTextAreaStyle.setAttribute('type', 'text/css');
+ document.head.appendChild(mTextAreaStyle);
+ mTextAreaStyle.sheet.insertRule('textarea{ padding-bottom: 95px; }', 0);
+
+ var key = document.getElementById('key');
+ key.style.top = 'auto';
+ key.style.bottom = '0px';
+
+ var box1 = document.getElementById('box1');
+ box1.style.transition = 'opacity 1s';
+ setTimeout(() => {
+ box1.style.opacity = 0;
+ box1.addEventListener('transitionend', function(event) {
+ box1.parentElement.removeChild(box1)
+ }, {
+ capture: false,
+ once: true
+ });
+
+ var tArea = document.querySelector('textarea');
+ tArea.style.paddingBottom = '95px';
+ }, 1000);
+ }
+ }