<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -34,14 +34,18 @@
 //container for the tweets that will make a quote
 var tweetlist = {}
 
-//interval to be used whe user turns autoadd on
+//interval to be used when user turns autoadd on
 var auto_add_interval = 0
 
+//interval to be used to check when the user closed the popup
+var check_popup_state_interval = 0
+
 // global preferences
 var preferences = {
     'order' : 'asc'
 }
 var embed_styles = null
+var popup_window
 
 //For people without firebug
 if (!console) {
@@ -204,45 +208,42 @@ function createQuote(){
     return true
 }
 
-function splitScreenToggle(mode){
+function launchPopupMode(link){
     var quoteurl_half = $('main-container')
     var twitter_half = $('twitter-container')
-    var twitter_iframe = $('twitter-iframe')
-    var permalink_help = $('permalink-help')
-    permalink_help.removeClass((mode!='search')?'search':'home')
-    permalink_help.addClass((mode=='search')?'search':'home')
-    var urls = {
-        'home':'http://twitter.com/home',
-        'search':'http://search.twitter.com'
-    }
-    if ((mode=='close')||((document.body.hasClass('splitted')) &amp;&amp; (twitter_half.get('_mode') == mode))){
-        quoteurl_half.style.width = '98%'
-        twitter_half.style.width = '1%'
-        twitter_half.style.visibility = 'hidden'
-        twitter_iframe.style.visibility = 'hidden'
-        document.body.removeClass('splitted')
-        clearInterval(auto_add_interval)
-    } else {
-        quoteurl_half.style.width = '50%'
-        twitter_half.style.width = '45%'
-        twitter_half.style.visibility = 'visible'
-        twitter_iframe.style.visibility = 'visible'
-        if (twitter_iframe.get('src') != urls[mode]){
-            if (twitter_iframe.get('src') != undefined) {
-                twitter_iframe.style.visibility = 'hidden'
-                twitter_iframe.addEventListener('load', function(){
-                    $('twitter-iframe').style.visibility = 'visible'
-                }, false)
+    quoteurl_half.style.width = '50%'
+    twitter_half.style.width = '45%'
+    twitter_half.style.visibility = 'visible'
+    document.body.addClass('splitted')
+    var popScreenX = window.screenX + twitter_half.offsetLeft
+    var popScreenY = window.screenY
+    var popWidth = twitter_half.offsetWidth + 20
+    var popHeight = window.innerHeight + 20
+    popup_window = window.open(link.get('href'),link.get('_windowname'),
+    'scrollbars=yes,screenX='+popScreenX+',screenY='+popScreenY+',width='+popWidth+',height='+popHeight);
+    popup_window.focus()
+    check_popup_state_interval = setInterval(function(){
+        try{
+            if (popup_window.closed === true){
+                closePopupMode()
             }
-            twitter_iframe.set('src', urls[mode])
-            
-        } 
-        document.body.addClass('splitted')
-        autoAddOn()
-        twitter_half.set('_mode', mode)
-    }
-    updateIframeHeight()
-    return false;
+            updateIframeHeight()
+        }catch(e){
+            console.log(e)
+        }
+    },500)
+    return false
+}
+
+function closePopupMode(){
+    var quoteurl_half = $('main-container')
+    var twitter_half = $('twitter-container')
+    quoteurl_half.style.width = '98%'
+    twitter_half.style.width = '1%'
+    twitter_half.style.visibility = 'hidden'
+    document.body.removeClass('splitted')
+    clearInterval(check_popup_state_interval)
+    popup_window.close()
 }
 
 function enableAutoAdd(){</diff>
      <filename>js/main.js</filename>
    </modified>
    <modified>
      <diff>@@ -24,20 +24,23 @@ body{
     margin-right:.3em;
     border-left:5px dashed #AFEFF1;
 }
-#iframe-loading{
+#click-to-raise{
     position:absolute;
     color:#AFEFF1;
     font-size:3em;
     top:5em;
-    left:70%;
+    left:60%;
     z-index:1;
 }
-#twitter-iframe{
+#twitter-raise{
     border:none;
     position:relative;
     z-index:2;
     width:100%;
     height:100%;
+    background:none;
+    opacity:.5;
+    cursor:pointer;
 }
 #close-split{
     position:fixed;</diff>
      <filename>skin/default/style.css</filename>
    </modified>
    <modified>
      <diff>@@ -32,11 +32,10 @@
                         &lt;/div&gt;
                     &lt;/form&gt;
                     &lt;div class=&quot;split-help&quot;&gt;
-                        &lt;p&gt;&lt;strike&gt;Or you can use one of the &lt;b&gt;Split Screen Modes&lt;/b&gt;: 
-                        &lt;b&gt;Twitter Home&lt;/b&gt; and 
-                        &lt;b&gt;Twitter Search&lt;/b&gt; 
-                        to drag &lt;b&gt;permalinks&lt;/b&gt; to the text-field.&lt;/strike&gt;&lt;/p&gt;
-                        &lt;p&gt;Split Screen Mode is &lt;a href=&quot;http://www.quoteurl.com/veazm&quot;&gt;disabled&lt;/a&gt;. Drag'n drop will return soon in a different form, thanks for the patience.&lt;/p&gt;
+                        &lt;p&gt;Or you can split the screen and pop-up 
+                            &lt;a href=&quot;http://twitter.com/home&quot; target=&quot;_blank&quot; onclick=&quot;return launchPopupMode(this);&quot; _windowname=&quot;quoteurl_popup&quot; &gt;Twitter Home&lt;/a&gt; or 
+                            &lt;a href=&quot;http://search.twitter.com&quot; target=&quot;_blank&quot; onclick=&quot;return launchPopupMode(this);&quot; _windowname=&quot;quoteurl_popup&quot;&gt;Twitter Search&lt;/a&gt; 
+                            in a separated window to drag &lt;b&gt;permalinks&lt;/b&gt; into the text-field.&lt;/p&gt;
                         &lt;div id=&quot;permalink-help&quot;&gt;&lt;/div&gt;
                         &lt;div class=&quot;section-end&quot;&gt;&lt;/div&gt;
                     &lt;/div&gt;
@@ -72,9 +71,9 @@
             &lt;/div&gt;
         &lt;/div&gt; &lt;!-- end main --&gt;
         &lt;div id=&quot;twitter-container&quot;&gt;
-            &lt;a class=&quot;del&quot; href=&quot;#&quot; id=&quot;close-split&quot; onclick=&quot;return splitScreenToggle('close');&quot;&gt;x&lt;/a&gt;
-            &lt;p id=&quot;iframe-loading&quot;&gt;Loading&#8230;&lt;/p&gt;
-            &lt;iframe id=&quot;twitter-iframe&quot;&gt;&lt;/iframe&gt;
+            &lt;a class=&quot;del&quot; href=&quot;#&quot; id=&quot;close-split&quot; onclick=&quot;return closePopupMode();&quot;&gt;x&lt;/a&gt;
+            &lt;p id=&quot;click-to-raise&quot;&gt;Click to raise Twitter pop-up.&lt;/p&gt;
+            &lt;div id=&quot;twitter-raise&quot; onclick=&quot;return popup_window.focus();&quot;&gt;&lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;footer&quot;&gt;
             &lt;p&gt;</diff>
      <filename>templates/index.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0f5fbf53e33923181c7895544c73db419604ebf5</id>
    </parent>
  </parents>
  <author>
    <name>Fabricio Zuardi</name>
    <email>fabricio@gmail.com</email>
  </author>
  <url>http://github.com/fczuardi/quoteurl/commit/28740eabea6133f9b472ab9506c63d437e35a58e</url>
  <id>28740eabea6133f9b472ab9506c63d437e35a58e</id>
  <committed-date>2009-03-18T17:06:01-07:00</committed-date>
  <authored-date>2009-03-18T17:06:01-07:00</authored-date>
  <message>New Split Screen mode, now based on popup windows instead of iframe
[#28 state:resolved]</message>
  <tree>8b1e4ea0e602e5f06e3642ee8cc62882d28cf4f4</tree>
  <committer>
    <name>Fabricio Zuardi</name>
    <email>fabricio@gmail.com</email>
  </committer>
</commit>
