From 2a3105772691ebbed7e68aa6b293712270d0ad4e Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 10 Apr 2012 23:55:15 +0200 Subject: [PATCH] Open userscript width only --- couchpotato/core/plugins/userscript/template.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/userscript/template.js b/couchpotato/core/plugins/userscript/template.js index 0134cd2b..090a62ba 100644 --- a/couchpotato/core/plugins/userscript/template.js +++ b/couchpotato/core/plugins/userscript/template.js @@ -57,8 +57,8 @@ if (typeof GM_addStyle == 'undefined'){ // Styles GM_addStyle('\ - #cp_popup { width: 492px; font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; -moz-border-radius: 6px 0px 0px 6px; -webkit-border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px; -moz-box-shadow: 0 0 20px rgba(0,0,0,0.5); -webkit-box-shadow: 0 0 20px rgba(0,0,0,0.5); box-shadow: 0 0 20px rgba(0,0,0,0.5); position:fixed; z-index:9999; bottom:0; right:0; font-size:15px; margin: 20px 0; display: block; background:#4E5969; } \ - #cp_popup:hover { } \ + #cp_popup { font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; -moz-border-radius: 6px 0px 0px 6px; -webkit-border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px; -moz-box-shadow: 0 0 20px rgba(0,0,0,0.5); -webkit-box-shadow: 0 0 20px rgba(0,0,0,0.5); box-shadow: 0 0 20px rgba(0,0,0,0.5); position:fixed; z-index:9999; bottom:0; right:0; font-size:15px; margin: 20px 0; display: block; background:#4E5969; } \ + #cp_popup.opened { width: 492px; } \ #cp_popup a#add_to { cursor:pointer; text-align:center; text-decoration:none; color: #000; display:block; padding:5px 0 5px 5px; } \ #cp_popup a#close_button { cursor:pointer; float: right; padding:120px 10px 10px; } \ #cp_popup a img { vertical-align: middle; } \ @@ -98,12 +98,14 @@ var osd = function(){ catch(e){} popup.innerHTML = ''; + popup.setAttribute('class', 'opened'); popup.appendChild(create('a', { 'innerHTML': '', 'id': 'close_button', 'onclick': function(){ popup.innerHTML = ''; popup.appendChild(add_button); + popup.setAttribute('class', ''); } })); popup.appendChild(iframe)