A bit of formatting to make it neater
authorDaniel Davis <ddavis@w3.org>
Tue, 03 Sep 2013 23:05:08 +0900
changeset 21 043a5ae4eba7
parent 20 812d50af99c9
child 22 b738e9a337a2
A bit of formatting to make it neater
js/w3c_talks.js
--- a/js/w3c_talks.js	Tue Sep 03 23:01:31 2013 +0900
+++ b/js/w3c_talks.js	Tue Sep 03 23:05:08 2013 +0900
@@ -1,6 +1,12 @@
 (function() {
     'use strict';
     
+    // Global variables
+    var url = 'http://tekka.keio.w3.org/~hiroto/autotweet/app_dev.php/post';
+    var hashtag = getMetaTag('hashtag');
+    var author = getMetaTag('author');
+    var title = document.title;
+    
     // Polyfill for sessionStorage taken from https://gist.github.com/tagawa/2880273/
     window.sessionStorage = window.sessionStorage || {
         length: 0,
@@ -55,6 +61,7 @@
         document.body.appendChild(ui);
         
         // Add functionality to start button
+        window.sessionStorage['accesskey'] = '';
         var start = document.getElementById('w3c_talks_start');
         start.onclick = function(event) {
             window.sessionStorage['accesskey'] = 'asdf1234';
@@ -66,13 +73,6 @@
         };
     }
 
-    // Global variables for tweet posting
-    var url = 'http://tekka.keio.w3.org/~hiroto/autotweet/app_dev.php/post';
-    var hashtag = getMetaTag('hashtag');
-    var author = getMetaTag('author');
-    var title = document.title;
-    window.sessionStorage['accesskey'] = '';
-    
     function getMetaTag(name) {
         var tag = document.querySelector('[name=' + name + ']');