├── images ├── ff.jpg ├── rw.jpg ├── tv.png ├── icon.png ├── kodi.png ├── prev.png ├── skip.png ├── stop.jpg ├── icon-16.png ├── loading.gif ├── bitcoin_qr.png ├── playpause.gif ├── playpause.jpg ├── btn_donate_LG.gif ├── configuration.jpg ├── glyphicons-halflings.png ├── ui-icons_222222_256x240.png ├── ui-icons_2e83ff_256x240.png ├── ui-icons_454545_256x240.png ├── ui-icons_888888_256x240.png ├── ui-icons_cd0a0a_256x240.png ├── glyphicons-halflings-white.png ├── ui-bg_flat_0_aaaaaa_40x100.png ├── ui-bg_flat_75_ffffff_40x100.png ├── ui-bg_glass_55_fbf9ee_1x400.png ├── ui-bg_glass_65_ffffff_1x400.png ├── ui-bg_glass_75_dadada_1x400.png ├── ui-bg_glass_75_e6e6e6_1x400.png ├── ui-bg_glass_95_fef1ec_1x400.png └── ui-bg_highlight-soft_75_cccccc_1x100.png ├── .web-extension-id ├── js ├── content_scripts │ ├── streamcloud-content-scripts.js │ ├── liveleak-content-scripts.js │ ├── urgantshow-content-scripts.js │ ├── solarmoviez-content-scripts.js │ ├── kinolive-content-scripts.js │ ├── animelab-content-scripts.js │ ├── pornhub-content-scripts.js │ ├── seasonvar-content-scripts.js │ ├── facebook-content-scripts.js │ ├── vessel-content-scripts.js │ ├── vivo-content-scripts.js │ ├── hulu-content-scripts.js │ ├── khanacademy-content-scripts.js │ ├── lyndacom-content-scripts.js │ ├── xnxx-content-scripts.js │ ├── soundcloud-content-scripts.js │ ├── embedded-video-content-scripts.js │ ├── youtube-content-scripts.js │ ├── context-menu-content-scripts.js │ └── cda-content-scripts.js ├── init.js ├── shared.js ├── background_scripts │ └── background.js ├── options.js ├── xbmc-helper.js └── bootstrap.min.js ├── README ├── LICENSE ├── css ├── styles.css ├── bootstrap-responsive.min.css ├── jquery-ui-1.11.4.theme.css ├── jquery-ui-1.11.4.structure.css └── bootstrap-responsive.css ├── .gitignore ├── manifest.json └── remote.html /images/ff.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ff.jpg -------------------------------------------------------------------------------- /images/rw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/rw.jpg -------------------------------------------------------------------------------- /images/tv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/tv.png -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/icon.png -------------------------------------------------------------------------------- /images/kodi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/kodi.png -------------------------------------------------------------------------------- /images/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/prev.png -------------------------------------------------------------------------------- /images/skip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/skip.png -------------------------------------------------------------------------------- /images/stop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/stop.jpg -------------------------------------------------------------------------------- /images/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/icon-16.png -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/loading.gif -------------------------------------------------------------------------------- /images/bitcoin_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/bitcoin_qr.png -------------------------------------------------------------------------------- /images/playpause.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/playpause.gif -------------------------------------------------------------------------------- /images/playpause.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/playpause.jpg -------------------------------------------------------------------------------- /images/btn_donate_LG.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/btn_donate_LG.gif -------------------------------------------------------------------------------- /images/configuration.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/configuration.jpg -------------------------------------------------------------------------------- /images/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/glyphicons-halflings.png -------------------------------------------------------------------------------- /images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /images/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maciex/play-to-kodi/HEAD/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /.web-extension-id: -------------------------------------------------------------------------------- 1 | # This file was created by https://github.com/mozilla/web-ext 2 | # Your auto-generated extension ID for addons.mozilla.org is: 3 | {ba707b6e-571d-47c9-a31d-7b94807d6ee2} -------------------------------------------------------------------------------- /js/content_scripts/streamcloud-content-scripts.js: -------------------------------------------------------------------------------- 1 | chrome.runtime.onMessage.addListener( 2 | function(request, sender, sendResponse) { 3 | if ("getStreamCloudVideo" == request.action) { 4 | sendResponse({ url: $('html').html().match("http.*?\\.mp4")[0] }); 5 | } 6 | } 7 | ); 8 | -------------------------------------------------------------------------------- /js/content_scripts/liveleak-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | chrome.runtime.onMessage.addListener( 3 | function(request, sender, sendResponse) { 4 | if ("getLiveLeakVideoUrl" == request.action) { 5 | sendResponse({url:$('html').html().match('file: "(.+?)",')[1]}); 6 | } 7 | } 8 | ); 9 | 10 | -------------------------------------------------------------------------------- /js/content_scripts/urgantshow-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | chrome.runtime.onMessage.addListener( 3 | function(request, sender, sendResponse) { 4 | if ("getUrgantShowVideoUrl" == request.action) { 5 | sendResponse({url:$('html').html().match('http.*?\\.mp4')[0]}); 6 | } 7 | } 8 | ); 9 | 10 | -------------------------------------------------------------------------------- /js/content_scripts/solarmoviez-content-scripts.js: -------------------------------------------------------------------------------- 1 | chrome.runtime.onMessage.addListener( 2 | function(request, sender, sendResponse) { 3 | if ("getSolarmoviezVideo" == request.action) { 4 | // Video-URL is only available when video is playing 5 | var videoUrl = $("video.jw-video").attr("src"); 6 | sendResponse({ url: videoUrl }); 7 | } 8 | } 9 | ); -------------------------------------------------------------------------------- /js/content_scripts/kinolive-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | chrome.runtime.onMessage.addListener( 3 | function(request, sender, sendResponse) { 4 | if ("getKinoLiveVideoUrl" == request.action) { 5 | var videoLink = $('html').html().match('file=(https?\\:.+?\\.flv)')[1]; 6 | if (videoLink) { 7 | sendResponse({url: videoLink}); 8 | } 9 | } 10 | } 11 | ); 12 | 13 | -------------------------------------------------------------------------------- /js/content_scripts/animelab-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | var $video = $('video'); 6 | if (request.action == "getVideoSrc") { 7 | var videoSrc = $video.attr('src'); 8 | sendResponse({videoSrc: videoSrc}); 9 | } else if (request.action == "onPlayback") { 10 | $video[0].pause(); 11 | } 12 | } 13 | ); -------------------------------------------------------------------------------- /js/content_scripts/pornhub-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | var $video = $('#player video:first'); 6 | if (request.action == "getVideoSrc") { 7 | var videoSrc = $video.find('source:first').attr('src'); 8 | sendResponse({videoSrc: videoSrc}); 9 | } else if (request.action == "onPlayback") { 10 | $video[0].pause(); 11 | } 12 | } 13 | ); 14 | -------------------------------------------------------------------------------- /js/content_scripts/seasonvar-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | var $video = $('video'); 6 | if (request.action == "getVideoSrc") { 7 | var videoSrc = 8 | $video.find('source:first').attr('src') 9 | || $video.attr('src') 10 | ; 11 | sendResponse({videoSrc: videoSrc}); 12 | } else if (request.action == "onPlayback") { 13 | $video[0].pause(); 14 | } 15 | } 16 | ); 17 | -------------------------------------------------------------------------------- /js/content_scripts/facebook-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | chrome.runtime.onMessage.addListener( 3 | function(request, sender, sendResponse) { 4 | if ("getFacebookVideoUrl" == request.action) { 5 | try { 6 | var videoLink = $('html').html().match('hd_src_no_ratelimit"?:"([^"]*)')[1]; 7 | } catch (e) { 8 | videoLink = $('html').html().match('sd_src_no_ratelimit"?:"([^"]*)')[1]; 9 | } 10 | if (videoLink) { 11 | sendResponse({url: videoLink}); 12 | } 13 | 14 | } 15 | } 16 | ); 17 | 18 | -------------------------------------------------------------------------------- /js/content_scripts/vessel-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | console.log("Received message: " + request.action); 6 | if (request.action == "getVideoSrc") { 7 | var videoSrc = decodeURIComponent($('video.video-show').attr('src')); 8 | sendResponse({videoSrc: videoSrc}); 9 | } else if (request.action == 'onPlayback') { 10 | $('video')[0].pause(); 11 | } else { 12 | console.log('Unknown action: ' + request.action); 13 | } 14 | } 15 | ); -------------------------------------------------------------------------------- /js/content_scripts/vivo-content-scripts.js: -------------------------------------------------------------------------------- 1 | chrome.runtime.onMessage.addListener( 2 | function(request, sender, sendResponse) { 3 | if ("getVivoVideo" == request.action) { 4 | // Video-URL is only available when video is playing 5 | var videoAlreadyPlaying = $("#player.is-playing").length == 1 6 | if (!videoAlreadyPlaying){ 7 | window.alert("For Vivo, please start the video before streaming to Kodi!"); 8 | return true; 9 | } 10 | 11 | var videoUrl = $("video.fp-engine").attr("src"); 12 | sendResponse({ url: videoUrl }); 13 | } 14 | } 15 | ); -------------------------------------------------------------------------------- /js/content_scripts/hulu-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | var contentId; 3 | var eid; 4 | init(); 5 | 6 | chrome.runtime.onMessage.addListener( 7 | function(request, sender, sendResponse) { 8 | if (request.action == "getContentId") { 9 | if (contentId) { 10 | sendResponse({contentId: JSON.stringify(contentId)}); 11 | } 12 | } else if (request.action == "getEid") { 13 | if (eid) { 14 | sendResponse({eid: JSON.stringify(eid)}); 15 | } 16 | } 17 | } 18 | ); 19 | 20 | function init() { 21 | contentId = $('html').html().match('"content_id": "(.+?)",')[1]; 22 | eid = $('html').html().match('eid=(.+?)"')[1]; 23 | } -------------------------------------------------------------------------------- /js/content_scripts/khanacademy-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | var youtubeid; 3 | init(); 4 | 5 | chrome.runtime.onMessage.addListener( 6 | function(request, sender, sendResponse) { 7 | if (request.action == "isValid") { 8 | if (youtubeid) { 9 | sendResponse({valid: JSON.stringify(true)}); 10 | } else { 11 | sendResponse({valid: JSON.stringify(false)}) 12 | } 13 | 14 | } else if (request.action == "getYoutubeId") { 15 | if (youtubeid) { 16 | sendResponse({youtubeId: JSON.stringify(youtubeid)}); 17 | } 18 | } 19 | } 20 | ); 21 | 22 | function init() { 23 | youtubeid = $('.youtube-video iframe.player').attr('data-youtubeid'); 24 | } -------------------------------------------------------------------------------- /js/content_scripts/lyndacom-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | if (request.action == "getVideoSrc") { 6 | var videoSrc = $('div.play-video').attr('data-vid'); 7 | if (!videoSrc) { 8 | var flashVars = decodeURIComponent($('div.slide-container param[name="flashvars"]').attr('value')).match("file=([^&]+)"); 9 | if (flashVars && flashVars.length > 1) { 10 | videoSrc = flashVars[1]; 11 | } 12 | } 13 | if (!videoSrc) { 14 | videoSrc = $('.videoStage video').attr('h264'); 15 | } 16 | sendResponse({videoSrc: videoSrc}); 17 | } 18 | } 19 | ); -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | A Google Chrome/Firefox Extension for sending online content to be played on XBMC/Kodi. 2 | 3 | Supported websites include 4 | 5 | * Acestream 6 | * AnimeLab 7 | * ARD Mediathek (German TV Station) 8 | * Cda.pl 9 | * CollegeHumor 10 | * DailyMotion 11 | * eBaumsWorld 12 | * Ex.ua 13 | * Facebook 14 | * Freeride.se 15 | * Hulu 16 | * Katsomo.fi 17 | * Khan Academy 18 | * Kino-live (Russian) 19 | * LiveLeak 20 | * Lynda 21 | * MP4Upload 22 | * MixCloud 23 | * MyCloudPlayers 24 | * Pornhub 25 | * Ruutu.fi 26 | * Seasonvar 27 | * Sopcast 28 | * SoundCloud 29 | * StreamCloud 30 | * SVTPlay & Öppet Arkiv (Swedish TV Station) 31 | * Torrent 32 | * Twitch.tv 33 | * Urgant Show (Russian Talk Show) 34 | * Vessel 35 | * Vimeo 36 | * Vivo.sx 37 | * Yle Areena 38 | * YouTube 39 | * ZDF Mediathek (German TV Station) 40 | -------------------------------------------------------------------------------- /js/content_scripts/xnxx-content-scripts.js: -------------------------------------------------------------------------------- 1 | chrome.runtime.onMessage.addListener( 2 | function(request, sender, sendResponse) { 3 | console.log("Received message: " + request.action); 4 | if (request.action == "getEmbeddedVideos" || request.action == "getVideoSrc") { 5 | // debugger; 6 | var embed = $('embed'); 7 | for (var i = 0; i < embed.length; i++) { 8 | var flashvars = embed[i].attributes.flashvars.nodeValue; 9 | var urls = flashvars.split("&"); 10 | for (var j = 0; j < urls.length; j++) { 11 | if (urls[j].indexOf('flv_url=') == 0 ) { 12 | var videoSrc = decodeURIComponent(urls[j].substring(8)); 13 | sendResponse({videoSrc: videoSrc}); 14 | return; 15 | } 16 | } 17 | } 18 | } else { 19 | console.log('Unknown action: ' + request.action); 20 | } 21 | } 22 | ); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2018 Khee Hong Loke 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /js/init.js: -------------------------------------------------------------------------------- 1 | $(document).ready( function() { 2 | initFocusFix(); 3 | initWatchdog(); 4 | initProfiles(); 5 | initConnectivity(function() { 6 | initJsonVersion(); 7 | initSeekerSlider(); 8 | initVolumeSlider(); 9 | initKeyBindings(); 10 | 11 | clearNonPlayingPlaylist(function() { 12 | initVideoButton(); 13 | initFavouritesTable(); 14 | initQueueCount(); 15 | initRepeatMode(); 16 | initPlaylistNumbers(); 17 | }); 18 | }); 19 | 20 | $('#previousBtn').click(function() {previous()}); 21 | $('#rewindBtn').click(function() {playerSeek('smallbackward')}); 22 | $('#stopBtn').click(function() {stop()}); 23 | $('#playBtn').click(function() {playPause()}); 24 | $('#fastForwardBtn').click(function() {playerSeek('smallforward')}); 25 | $('#nextBtn').click(function() {next()}); 26 | 27 | $('#queueListButton').click(function() {queuePlaylist($(this))}); 28 | $('#addToFavButton').click(function() {addToFavourites()}); 29 | $('#repeatButton').click(function() {toggleRepeat()}); 30 | $('#playNextButton').click(function() {playNextCurrentUrl($(this))}); 31 | $('#removeThisButton').click(function() {removeThisFromPlaylist($(this))}); 32 | $('#clearPlaylistButton').click(function() {emptyPlaylist()}); 33 | // $('#testBtn').click(function() { initVideoButton() }); 34 | 35 | if (!hasUrlSetup()) { 36 | $('#setupTooltip').css("display", "block"); 37 | } else if (hasBeenUpdated()) { 38 | $('#updateTooltip').css("display", "block"); 39 | } 40 | updateVersion(); 41 | 42 | }); 43 | -------------------------------------------------------------------------------- /js/content_scripts/soundcloud-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | initSoundcloudList(); 3 | 4 | chrome.runtime.onMessage.addListener( 5 | function(request, sender, sendResponse) { 6 | if (request.action == "getPlaylistUrls") { 7 | sendResponse({trackIds: JSON.stringify(trackIds)}); 8 | } 9 | } 10 | ); 11 | 12 | function initSoundcloudList(){ 13 | var tabUrl = window.location.href; 14 | var queueListButton = $('#queueListButton'); 15 | var soundcloudRegex = '(https|http)://(www\.)?soundcloud.com/[^_&/#\?]+/sets/[^_&/#\?]+'; 16 | if (tabUrl.match(soundcloudRegex)) { 17 | getSoundcloudSetId(tabUrl, function (setId) { 18 | getSoundcloudSetTrackIds(setId, function () { 19 | }); 20 | }); 21 | } 22 | } 23 | 24 | function getSoundcloudSetId(url, callback) { 25 | var soundcloudRegex = 'url=.+playlists%2F([^&]+).+'; 26 | jQuery.ajax({ 27 | type: 'POST', 28 | url: 'http://soundcloud.com/oembed?url=' + url, 29 | success: function (result) { 30 | var iframetext = $(result).find("html").text(); 31 | if (iframetext.indexOf('tracks')) { 32 | var setId = iframetext.match(soundcloudRegex)[1]; 33 | 34 | callback(setId); 35 | } else { 36 | callback(null); 37 | } 38 | } 39 | }); 40 | } 41 | 42 | function getSoundcloudSetTrackIds(setId, callback) { 43 | var apiUrl = 'http://api.soundcloud.com/playlists/' + setId + '.json?client_id=869ae8a206b21cdec128954e69aaf5b9'; 44 | 45 | $.getJSON(apiUrl, function (result) { 46 | if (result && result.tracks) { 47 | var tracksJson = result.tracks; 48 | for (var i in tracksJson) { 49 | if (tracksJson.hasOwnProperty(i)) { 50 | trackIds.push(tracksJson[i].id); 51 | } 52 | } 53 | 54 | callback(trackIds); 55 | } 56 | }); 57 | } 58 | 59 | var trackIds = []; -------------------------------------------------------------------------------- /js/content_scripts/embedded-video-content-scripts.js: -------------------------------------------------------------------------------- 1 | 2 | chrome.runtime.onMessage.addListener( 3 | function(request, sender, sendResponse) { 4 | if (request.action == "getEmbeddedVideos") { 5 | sendResponse(videoList); 6 | } 7 | } 8 | ); 9 | 10 | var videoList = []; 11 | getEmbeddedVideos(); 12 | 13 | function getEmbeddedVideos(callback) { 14 | videoList = []; 15 | var videoIdList = []; 16 | 17 | var $iframes = $('iframe[src*="youtube.com/embed"]'); 18 | var regex = ".*youtube.com/embed/([^&/?]+).*"; 19 | for (var i = 0; i < $iframes.length; i++) { 20 | var obj = $($iframes[i])[0]; 21 | 22 | if (obj && obj.src && obj.src.match(regex)) { 23 | videoIdList.push(obj.src.match(regex)[1]); 24 | } 25 | } 26 | 27 | if (videoIdList.length === 0) { 28 | return; 29 | } 30 | 31 | var url = "https://www.googleapis.com/youtube/v3/videos?part=snippet&id=" + combineVideoIdList(videoIdList) + "&key=AIzaSyA3INgfTLddMbrJm8f68xpvfPZDAzDqk10"; 32 | $.getJSON(url, function (data) { 33 | for (var i = 0; i < data.items.length; i++) { 34 | var item = data.items[i]; 35 | var title = item.snippet.title; 36 | var videoID = item.id; 37 | var videoURL = 'https://www.youtube.com/watch?v='; 38 | var url = videoURL + videoID; 39 | 40 | videoList.push({ 41 | id: videoID, 42 | title: title, 43 | url: url 44 | }); 45 | } 46 | 47 | if (callback) { 48 | callback(videoList); 49 | } 50 | }); 51 | } 52 | 53 | function combineVideoIdList(videoIdList) { 54 | var videoIdString = ''; 55 | for (var i = 0; i < videoIdList.length; i++) { 56 | var videoId = videoIdList[i]; 57 | if (i != 0) { 58 | videoIdString += ','; 59 | } 60 | videoIdString += videoId; 61 | } 62 | 63 | return videoIdString; 64 | } 65 | -------------------------------------------------------------------------------- /js/content_scripts/youtube-content-scripts.js: -------------------------------------------------------------------------------- 1 | initYouTubeList(); 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | if (request.action == "getPlaylistUrls") { 6 | initYouTubeList(); 7 | sendResponse({urlList: JSON.stringify(urlList)}); 8 | } else if (request.action == "onPlayback") { 9 | $("video")[0].pause(); 10 | } 11 | } 12 | ); 13 | 14 | /** 15 | * if this is youtube page which is part of a playlist , show all videos and the option to queue them all 16 | * 17 | */ 18 | function initYouTubeList(){ 19 | var tabUrl = window.location.href; 20 | var youTubeListId = getURLParameter(tabUrl, 'list'); 21 | if (youTubeListId && youTubeListId != playlistId){ 22 | playlistId = youTubeListId; 23 | extractVideosFromYouTubePlaylist(youTubeListId); 24 | } 25 | } 26 | 27 | function extractVideosFromYouTubePlaylist(playListID, token) { 28 | var videoURL = 'https://www.youtube.com/watch?v='; 29 | var playListURL = '//www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&maxResults=50&playlistId=' + playListID + '&key=AIzaSyA3INgfTLddMbrJm8f68xpvfPZDAzDqk10'; 30 | if (token) { 31 | playListURL = playListURL + '&pageToken=' + token; 32 | } 33 | 34 | $.getJSON(playListURL, function (data) { 35 | var nextPageToken; 36 | if (data.nextPageToken) { 37 | nextPageToken = data.nextPageToken; 38 | } 39 | 40 | $.each(data.items, function (i, item) { 41 | var videoID = item.contentDetails.videoId; 42 | var url = videoURL + videoID; 43 | 44 | urlList.push(url); 45 | }); 46 | 47 | if (nextPageToken) { 48 | extractVideosFromYouTubePlaylist(playListID, startIndex + itemsPerPage); 49 | } 50 | }); 51 | } 52 | 53 | var playlistId; 54 | var urlList = []; 55 | 56 | function getURLParameter(tabUrl, sParam) { 57 | var sPageURL = tabUrl.substring(tabUrl.indexOf('?') + 1 ); 58 | var sURLVariables = sPageURL.split('&'); 59 | for (var i = 0; i < sURLVariables.length; i++) { 60 | var sParameterName = sURLVariables[i].split('='); 61 | if (sParameterName[0] == sParam) { 62 | return sParameterName[1]; 63 | } 64 | } 65 | return null; 66 | } -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | #remoteRow { 2 | text-align: center; 3 | padding-bottom: 12px; 4 | } 5 | 6 | #remoteRow button { 7 | background: none; 8 | border: none; 9 | padding: 0; 10 | width: 40px; 11 | margin: 0 3px; 12 | } 13 | 14 | #remoteRow button:hover { 15 | cursor: pointer; 16 | } 17 | 18 | #remoteRow .playpause { 19 | border: 1px solid #eee; 20 | background-color: #fefefe; 21 | 22 | padding: 12px 10px 12px 5px; 23 | margin: 0 2px; 24 | border-radius: 5px; 25 | } 26 | 27 | #volumeRow { 28 | text-align: center; 29 | margin-left: auto; 30 | margin-right: auto; 31 | width: 195px; 32 | } 33 | 34 | #seekerRow { 35 | text-align: center; 36 | margin-left: 30px; 37 | margin-right: auto; 38 | width: 195px; 39 | } 40 | 41 | #seekerRow span.ui-slider-handle { 42 | border: 1px solid #1586cc; 43 | background: #179ccc 50% 50% repeat-x; 44 | font-weight: bold; 45 | color: #4c3000; 46 | top: -0.6em; 47 | border-radius: 10px; 48 | } 49 | 50 | #seekerRow span.ui-slider-handle:hover { 51 | background-color: #0f7dcc; 52 | } 53 | 54 | #seekerRow .ui-widget-header { 55 | background: #15A2E9 none; 56 | } 57 | 58 | #seekerRow .ui-slider-horizontal { 59 | height: 2px; 60 | } 61 | 62 | .timeIndicator { 63 | position: absolute; 64 | top: 135px; 65 | } 66 | 67 | #currentTime { 68 | left: 28px; 69 | } 70 | 71 | #totalTime { 72 | right: 28px; 73 | } 74 | 75 | #buttonsRow { 76 | text-align: center; 77 | } 78 | 79 | #buttonsRow .btn-group .single-action-btn { 80 | padding: 5px; 81 | margin-left: -1px; 82 | } 83 | 84 | #buttonsRow .btn-group .multi-video-btn { 85 | border-bottom-right-radius: 0; 86 | border-top-right-radius: 0; 87 | padding: 5px 7px; 88 | } 89 | 90 | .video-menu { 91 | overflow: hidden; 92 | max-width: 290px; 93 | text-align: left; 94 | } 95 | 96 | .row { 97 | margin: 15px auto; 98 | } 99 | 100 | .dropdown-menu .disabled>a:hover { 101 | background: none; 102 | } 103 | 104 | #moreBtn { 105 | padding: 5px 8px; 106 | border-top-left-radius: 0; 107 | border-bottom-left-radius: 0; 108 | margin-left: -1px; 109 | } 110 | 111 | #scrollerTime { 112 | position: absolute; 113 | background-color: white; 114 | z-index: 999; 115 | border: #d3d3d3 solid 1px; 116 | border-radius: 3px; 117 | padding: 2px 4px; 118 | } -------------------------------------------------------------------------------- /js/shared.js: -------------------------------------------------------------------------------- 1 | var currentVersion = parseInt(chrome.runtime.getManifest().version.replace(/\./g, '')); 2 | 3 | var storageKeys = { 4 | "showRepeat": "showRepeat", 5 | "profiles": "profiles", 6 | "enableMultiHost": "enableMultiHost", 7 | "selectedHost": "selectedHost", 8 | "enableDebugLogs": "enableDebugLogs", 9 | "magnetAddOn": "magnetAddOn" 10 | }; 11 | 12 | var actions = { 13 | "PlayPause": "Player.PlayPause", 14 | "Stop": "Player.Stop", 15 | "SmallSkipBackward":"VideoPlayer.SmallSkipBackward", 16 | "SmallSkipForward":"VideoPlayer.SmallSkipForward", 17 | "GoPrevious": "Player.GoPrevious", 18 | "GoNext": "Player.GoNext" 19 | }; 20 | 21 | var validPlaylistPatterns = [ 22 | ".*youtube.com/playlist.*list=.*", 23 | "(https|http)://(www\.)?youtube.com/watch?.*list=.+", 24 | "(https|http)://(www\.)?soundcloud.com/[^_&/#\?]+/sets/[^_&/#\?]+" 25 | ]; 26 | 27 | function getCurrentProfile() { 28 | var profile; 29 | var selectedHost = localStorage[storageKeys.selectedHost]; 30 | var allProfiles = JSON.parse(getAllProfiles()); 31 | 32 | for (var i = 0; i < allProfiles.length; i++) { 33 | var profile = allProfiles[i]; 34 | if (profile.id == selectedHost) { 35 | profile = profile; 36 | break; 37 | } 38 | } 39 | 40 | return profile; 41 | } 42 | 43 | function getURL() { 44 | var url; 45 | var port; 46 | 47 | if (isMultiHostEnabled()) { 48 | var profile = getCurrentProfile(); 49 | url = profile.url; 50 | port = profile.port; 51 | } else { 52 | url = localStorage["url"]; 53 | port = localStorage["port"]; 54 | } 55 | 56 | return 'http://'+url + ':' + port; 57 | } 58 | 59 | function getCredentials() { 60 | var username; 61 | var password; 62 | 63 | if (isMultiHostEnabled()) { 64 | var profile = getCurrentProfile(); 65 | username = profile.username; 66 | password = profile.password; 67 | } else { 68 | username = localStorage["username"]; 69 | password = localStorage["password"]; 70 | } 71 | 72 | return [username ? username : "anonymous", password]; 73 | } 74 | 75 | function isMultiHostEnabled() { 76 | var enableMultiHost = localStorage[storageKeys.enableMultiHost]; 77 | 78 | return enableMultiHost != null && enableMultiHost == 'true'; 79 | } 80 | 81 | function isDebugLogsEnabled() { 82 | var enableDebugLogs = localStorage[storageKeys.enableDebugLogs]; 83 | 84 | return enableDebugLogs != null && enableDebugLogs == 'true'; 85 | } 86 | 87 | function getAllProfiles() { 88 | return localStorage[storageKeys.profiles]; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | 165 | #IntelliJ Files 166 | 167 | .idea/* 168 | *.iml 169 | *.ipr 170 | *.iws -------------------------------------------------------------------------------- /js/content_scripts/context-menu-content-scripts.js: -------------------------------------------------------------------------------- 1 | function getEventPath(event) { 2 | var path = []; 3 | var node = event.target; 4 | while(node != document.body) { 5 | path.push(node); 6 | node = node.parentNode; 7 | } 8 | return path; 9 | } 10 | 11 | function addContextMenuTo(selector) { 12 | selector = selector + ', ' + selector + ' *'; 13 | var matches; 14 | ['matches', 'webkitMatchesSelector', 'webkitMatches', 'matchesSelector'].some(function(m) { 15 | if (m in document.documentElement) { 16 | matches = m; 17 | return true; 18 | } 19 | }); 20 | 21 | var isHovering = false; 22 | document.addEventListener('mouseover', function(event) { 23 | if (event.target && $.isFunction(event.target[matches]) && event.target[matches](selector)) { 24 | if (!event.path) { 25 | console.log("Using workaround to get event.path"); 26 | event.path = getEventPath(event); 27 | } 28 | for (var i = 0; i < event.path.length; i++) { 29 | var element = event.path[i]; 30 | if (element[matches] && element[matches]('a')) { 31 | createContextMenu(element.href); 32 | isHovering = true; 33 | break; 34 | } 35 | } 36 | } else if (isHovering) { 37 | isHovering = false; 38 | } 39 | }); 40 | document.addEventListener('mouseout', function(event) { 41 | if (isHovering && (!event.target || !event.target[matches](selector))) { 42 | isHovering = false; 43 | } 44 | }); 45 | } 46 | 47 | function createContextMenu(linkUrl) { 48 | if (linkUrl && linkUrl.match('^//.*$')) { 49 | var tabUrl = window.location.href; 50 | var patternMatch = tabUrl.match('^(https|http)://(.+)/.*$'); 51 | if (patternMatch) { 52 | chrome.runtime.sendMessage({action: 'createContextMenu', link: patternMatch[1] + ':' + linkUrl}, function (response) {}); 53 | } else { 54 | console.log("Could not determine what to do with link: " + linkUrl); 55 | } 56 | } else if (linkUrl && linkUrl.match('^/.*$')) { 57 | var tabUrl = window.location.href; 58 | var patternMatch = tabUrl.match('^(https|http)://([^/]+)/.*$'); 59 | if (patternMatch) { 60 | chrome.runtime.sendMessage({action: 'createContextMenu', link: patternMatch[1] + '://' + patternMatch[2] + linkUrl}, function (response) {}); 61 | } else { 62 | console.log("Could not determine what to do with link: " + linkUrl); 63 | } 64 | } else if (linkUrl && (linkUrl.match('^(https|http|acestream|sop)://.+$') || linkUrl.match('^(http|https)://.*\.(torrent|torrent\?.+)$'))) { 65 | chrome.runtime.sendMessage({action: 'createContextMenu', link: linkUrl}, function (response) {}); 66 | } else if (!linkUrl || linkUrl.trim() == '' 67 | || (linkUrl && (linkUrl.indexOf('#') == 0 68 | || linkUrl.indexOf('mailto') == 0 69 | || linkUrl.indexOf('javascript') == 0 70 | || linkUrl.indexOf('irc') == 0))) { 71 | //Do nothing to these links. 72 | } else { 73 | console.log("Could not determine what to do with link: " + linkUrl); 74 | } 75 | } 76 | 77 | addContextMenuTo('a'); 78 | 79 | $(document).ready(function() { 80 | for (var i = 0; i < allModules.length; i++) { 81 | var module = allModules[i]; 82 | if (module.createCustomContextMenus) { 83 | module.createCustomContextMenus(); 84 | } 85 | } 86 | }); 87 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "version": "1.9.1", 4 | "name": "Play to Kodi", 5 | "description": "Play, queue and remote control your favourite online media on Kodi / XBMC.", 6 | "applications": { 7 | "gecko": { 8 | "id": "{ba707b6e-571d-47c9-a31d-7b94807d6ee2}" 9 | } 10 | }, 11 | "options_page": "options.html", 12 | "permissions": [ "tabs", "*://www.googleapis.com/*", "http://*/*", "contextMenus" ], 13 | "browser_action": { 14 | "default_icon": "images/icon.png", 15 | "default_popup": "remote.html" 16 | }, 17 | "icons": { 18 | "16": "images/icon-16.png", 19 | "24": "images/icon.png", 20 | "128": "images/tv.png" 21 | }, 22 | "background": { 23 | "scripts": [ 24 | "js/jquery-2.1.4.min.js", 25 | "js/modules.js", 26 | "js/shared.js", 27 | "js/background_scripts/background.js", 28 | "js/xbmc-helper.js" 29 | ] 30 | }, 31 | "content_scripts": [{ 32 | "matches": [""], 33 | "js": ["js/jquery-2.1.4.min.js", "js/modules.js","js/content_scripts/context-menu-content-scripts.js", "js/content_scripts/embedded-video-content-scripts.js"], 34 | "all_frames": true 35 | },{ 36 | "matches": ["http://www.liveleak.com/view*"], 37 | "js": ["js/content_scripts/liveleak-content-scripts.js", "js/jquery-2.1.4.min.js"] 38 | },{ 39 | "matches": ["*://*.facebook.com/*"], 40 | "js": ["js/content_scripts/facebook-content-scripts.js", "js/jquery-2.1.4.min.js"] 41 | },{ 42 | "matches": ["*://www.youtube.com/*"], 43 | "js": ["js/jquery-2.1.4.min.js", "js/shared.js", "js/content_scripts/youtube-content-scripts.js"] 44 | }, { 45 | "matches": ["*://soundcloud.com/*"], 46 | "js": ["js/jquery-2.1.4.min.js", "js/shared.js", "js/content_scripts/soundcloud-content-scripts.js"] 47 | }, { 48 | "matches": ["*://streamcloud.eu/*"], 49 | "js": ["js/jquery-2.1.4.min.js", "js/shared.js", "js/content_scripts/streamcloud-content-scripts.js"] 50 | }, { 51 | "matches": ["*://mycloudplayers.com/*"], 52 | "js": ["js/shared.js", "js/content_scripts/soundcloud-content-scripts.js"] 53 | }, { 54 | "matches": ["*://*.khanacademy.org/*"], 55 | "js": ["js/jquery-2.1.4.min.js", "js/shared.js", "js/content_scripts/khanacademy-content-scripts.js"] 56 | }, { 57 | "matches": ["*://*.hulu.com/watch/*"], 58 | "js": ["js/jquery-2.1.4.min.js", "js/shared.js", "js/content_scripts/hulu-content-scripts.js"] 59 | }, { 60 | "matches": ["*://*.animelab.com/player/*"], 61 | "js": ["js/jquery-2.1.4.min.js", "js/content_scripts/animelab-content-scripts.js"] 62 | }, { 63 | "matches": ["*://*.lynda.com/*"], 64 | "js": ["js/jquery-2.1.4.min.js", "js/content_scripts/lyndacom-content-scripts.js"] 65 | }, { 66 | "matches": ["*://*.urgantshow.ru/page/*"], 67 | "js": ["js/content_scripts/urgantshow-content-scripts.js", "js/jquery-2.1.4.min.js"] 68 | }, { 69 | "matches": ["*://*.kino-live.org/*"], 70 | "js": ["js/content_scripts/kinolive-content-scripts.js", "js/jquery-2.1.4.min.js"] 71 | }, { 72 | "matches": ["*://*.vessel.com/*"], 73 | "js": ["js/content_scripts/vessel-content-scripts.js", "js/jquery-2.1.4.min.js"] 74 | }, { 75 | "matches": ["*://*.cda.pl/*"], 76 | "js": ["js/jquery-2.1.4.min.js", "js/jquery-ui-1.11.4.min.js", "js/content_scripts/cda-content-scripts.js"] 77 | }, { 78 | "matches": ["*://*.xnxx.com/*"], 79 | "js": ["js/content_scripts/xnxx-content-scripts.js", "js/jquery-2.1.4.min.js"] 80 | }, { 81 | "matches": ["*://*.seasonvar.ru/*"], 82 | "js": ["js/jquery-2.1.4.min.js", "js/content_scripts/seasonvar-content-scripts.js"] 83 | }, { 84 | "matches": ["*://solarmoviez.to/*"], 85 | "js": ["js/jquery-2.1.4.min.js", "js/content_scripts/solarmoviez-content-scripts.js"] 86 | }, { 87 | "matches": ["*://vivo.sx/*"], 88 | "js": ["js/jquery-2.1.4.min.js", "js/content_scripts/vivo-content-scripts.js"] 89 | }, { 90 | "matches": ["*://*.pornhub.com/*"], 91 | "js": ["js/jquery-2.1.4.min.js", "js/content_scripts/pornhub-content-scripts.js"] 92 | }], 93 | "web_accessible_resources": [ 94 | "images/*" 95 | ] 96 | } 97 | -------------------------------------------------------------------------------- /js/content_scripts/cda-content-scripts.js: -------------------------------------------------------------------------------- 1 | function findUrls( text ) 2 | { 3 | var source = (text || '').toString(); 4 | var urlArray = []; 5 | var url; 6 | var matchArray; 7 | 8 | // Regular expression to find FTP, HTTP(S) and email URLs. 9 | var regexToken = /(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})/g; 10 | 11 | // Iterate through any URLs in the text. 12 | while( (matchArray = regexToken.exec( source )) !== null ) 13 | { 14 | var token = matchArray[0]; 15 | urlArray.push( token ); 16 | } 17 | 18 | return urlArray; 19 | } 20 | 21 | function showdialog(urls, done) { 22 | // debugger; 23 | for (var i = 0; i < urls.length; i++) { 24 | if (urls[i].indexOf('.flv') > 0 || urls[i].indexOf('.mp4') > 0) { 25 | var url = urls[i]; 26 | return done(url); 27 | } 28 | } 29 | var buttons = []; 30 | for (var i = 0; i < urls.length; i++) { 31 | if (urls[i].indexOf('.flv') > 0 || urls[i].indexOf('.mp4') > 0) { 32 | var url = urls[i]; 33 | buttons.push({ 34 | text: url, 35 | click: function() { 36 | done(url); 37 | $(this).dialog("close"); 38 | } 39 | }); 40 | } 41 | } 42 | 43 | var layerNode= document.createElement('div'); 44 | layerNode.setAttribute('id','x-kodi-cda-dialog'); 45 | layerNode.setAttribute('title','Links information'); 46 | /* 47 | var pNode= document.createElement('p'); 48 | pNode.innerHTML = "woow"; 49 | layerNode.appendChild(pNode); 50 | */ 51 | document.body.appendChild(layerNode); 52 | 53 | jQuery("#x-kodi-cda-dialog").dialog({ 54 | autoOpen: true, 55 | draggable: true, 56 | resizable: true, 57 | height: 'auto', 58 | width: "800", 59 | zIndex:3999, 60 | modal: false, 61 | closeOnEscape: true, 62 | buttons: buttons, 63 | open: function(event, ui) { 64 | $(event.target).parent().css('position','fixed'); 65 | $(event.target).parent().css('top', '5px'); 66 | $(event.target).parent().css('left', '10px'); 67 | } 68 | }); 69 | } 70 | 71 | chrome.runtime.onMessage.addListener( 72 | function(request, sender, sendResponse) { 73 | console.log("Received message: " + request.action); 74 | if (request.action == "getEmbeddedVideos" || request.action == "getVideoSrc") { 75 | // debugger; 76 | try { 77 | var url = $('video').attr('src'); 78 | if( url === undefined ) 79 | throw "url is undefined"; 80 | url = decodeURIComponent(url); 81 | showdialog([url], function(url) { 82 | sendResponse({videoSrc: url}); 83 | }); 84 | return; 85 | } catch (e) { 86 | console.log("not html5 player:" + e); 87 | }; 88 | var stext = $('#player').text(); 89 | var es = stext.search('eval'); 90 | var ei = stext.slice(es).search('return p'); 91 | var ej = stext.slice(es).search(',{}'); 92 | var et = '['+stext.slice(es+ei+10,es+ej+3)+']'; 93 | var eo = eval(et); 94 | var pp=function(p,a,c,k,e,d){ 95 | e=function(c){ 96 | return( 97 | c35?String.fromCharCode(c+29):c.toString(36)) 99 | }; 100 | if(!''.replace(/^/,String)){ 101 | while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1 102 | }; 103 | while(c--){ 104 | if(k[c]){ 105 | p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]) 106 | } 107 | } 108 | return p 109 | } 110 | var result = pp(eo[0], eo[1], eo[2], eo[3], eo[4], eo[5]); 111 | var urls = findUrls(result); 112 | showdialog(urls, function(url) { 113 | var videoSrc = decodeURIComponent(url); 114 | sendResponse({videoSrc: videoSrc}); 115 | }); 116 | } else { 117 | console.log('Unknown action: ' + request.action); 118 | } 119 | } 120 | ); -------------------------------------------------------------------------------- /remote.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
26 | 27 |
28 | 29 |
30 | 31 |
32 |
33 |
34 | 35 |
36 |
37 | 38 |
39 |
40 |
41 | 42 |
43 |
44 | 45 | 51 | 52 | 53 | 59 | 60 | 61 | 67 | 68 | 69 | 72 | 80 | 81 |
82 |
83 | 84 | 85 | 86 | 87 |
88 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 |
105 | 106 |
107 | Configuration 108 | Kodi 109 | 110 |
Connecting...
111 |
112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /js/background_scripts/background.js: -------------------------------------------------------------------------------- 1 | var currentTabId; 2 | 3 | chrome.runtime.onMessage.addListener( 4 | function (request, sender, sendResponse) { 5 | if (request.tabId) currentTabId = request.tabId; 6 | switch (request.action) { 7 | case 'isAvailable': 8 | getXbmcJsonVersion(function (version) { 9 | if (version == null) { 10 | sendResponse({response: "NOT_DETECTED"}); 11 | } else { 12 | sendResponse({response: "OK"}); 13 | } 14 | }); 15 | break; 16 | 17 | case 'playThis': 18 | if (currentTabId) chrome.tabs.sendMessage(currentTabId, {action: 'onPlayback'}); 19 | playThisUrl(request.url, function() { 20 | sendResponse({response: "OK"}); 21 | }); 22 | break; 23 | 24 | case 'queueThis': 25 | queueThisUrl(request.url, function () { 26 | sendResponse({response: "OK"}); 27 | }); 28 | break; 29 | 30 | 31 | case 'queueList': 32 | queueList(request.url, request.urlList, function () { 33 | sendResponse({response: "OK"}); 34 | }); 35 | break; 36 | 37 | case 'removeThis': 38 | removeThisFromPlaylist(function () { 39 | sendResponse({response: "OK"}); 40 | }); 41 | break; 42 | 43 | case 'playThisNext': 44 | playThisNext(request.url, function () { 45 | sendResponse({response: "OK"}); 46 | }); 47 | break; 48 | 49 | case 'isDebugLogsEnabled': 50 | sendResponse({response: isDebugLogsEnabled()}); 51 | break; 52 | 53 | case 'createContextMenu': 54 | createContextMenu(request, function() { 55 | sendResponse({response: "OK"}); 56 | }); 57 | break; 58 | 59 | case 'resume': 60 | playThisUrl(request.url, function(){ 61 | resume(request.currentTime, function () { 62 | sendResponse({response: "OK"}); 63 | })}); 64 | break; 65 | case 'setLogging': 66 | debugLogsEnabled = request.enable; 67 | break; 68 | } 69 | 70 | return true; 71 | } 72 | ); 73 | 74 | /* 75 | * Called when the context menu item has been created, or when creation failed due to an error. 76 | * We'll just log success/failure here. 77 | */ 78 | function onContextMenuCreated(n) { 79 | if (debugLogsEnabled) { 80 | if (chrome.runtime.lastError) { 81 | console.log("Error creating context menu item:" + chrome.runtime.lastError); 82 | } else { 83 | console.log("Context menu item created successfully"); 84 | } 85 | } 86 | } 87 | 88 | function doAction(item, callback) { 89 | getActivePlayerId(function (playerid) { 90 | if (playerid != null) { 91 | var action = '{"jsonrpc": "2.0", "method": "' + item + '", "params":{"playerid":' + playerid + '}, "id" : 1}'; 92 | ajaxPost(action, function (result) { 93 | callback(result); 94 | }); 95 | } else { 96 | callback(null); 97 | } 98 | }); 99 | } 100 | 101 | function playThisUrl(url, callback) { 102 | doAction(actions.Stop, function () { 103 | clearPlaylist(function() { 104 | queueItem(url, function () { 105 | callback(); 106 | }); 107 | }) 108 | }); 109 | } 110 | 111 | function playThisNext(url, callback) { 112 | getPlaylistPosition(function (position) { 113 | insertItem(url, position + 1, function () { 114 | callback(); 115 | }); 116 | }); 117 | } 118 | 119 | function queueThisUrl(url, callback) { 120 | queueItem(url, function () { 121 | callback(); 122 | }); 123 | } 124 | 125 | function queueList(tabUrl, urlList, callback) { 126 | if (urlList.length === 0) { 127 | callback(); 128 | return; 129 | } 130 | queueItems(tabUrl, urlList, function (result) { 131 | callback(); 132 | 133 | }); 134 | } 135 | 136 | function removeThisFromPlaylist(callback) { 137 | getPlaylistPosition(function (position) { 138 | playerGoNext(function () { 139 | removeItemFromPlaylist(position, function () { 140 | callback(); 141 | }); 142 | }); 143 | }); 144 | } 145 | 146 | var contextMenuLinks = []; 147 | 148 | function isContextMenuCreated(url) { 149 | for (var i = 0; i < contextMenuLinks.length; i++) { 150 | var link = contextMenuLinks[i]; 151 | if (link == url) { 152 | return true; 153 | } 154 | } 155 | return false; 156 | } 157 | 158 | function createContextMenu(request, callback) { 159 | var link = request.link; 160 | for (var i = 0; i < allModules.length; i++) { 161 | var module = allModules[i]; 162 | if (module.canHandleUrl(link) && !isContextMenuCreated(link)) { 163 | contextMenuLinks.push(link); 164 | chrome.contextMenus.create({ 165 | title: "Play now", 166 | contexts: ["link"], 167 | targetUrlPatterns: [link], 168 | onclick: function(info) { 169 | doAction(actions.Stop, function () { 170 | clearPlaylist(function() { 171 | queueItem(info.linkUrl, function() { 172 | callback(); 173 | }); 174 | }) 175 | }); 176 | } 177 | }, onContextMenuCreated); 178 | 179 | chrome.contextMenus.create({ 180 | title: "Queue", 181 | contexts: ["link"], 182 | targetUrlPatterns: [link], 183 | onclick: function(info) { 184 | queueItem(info.linkUrl, function() { 185 | callback(); 186 | }); 187 | } 188 | }, onContextMenuCreated); 189 | 190 | chrome.contextMenus.create({ 191 | title: "Play this Next", 192 | contexts: ["link"], 193 | targetUrlPatterns: [link], 194 | onclick: function(info) { 195 | getPlaylistPosition(function (position) { 196 | insertItem(info.linkUrl, position + 1, function () { 197 | callback(); 198 | }); 199 | }); 200 | } 201 | }, onContextMenuCreated); 202 | 203 | } 204 | } 205 | } 206 | 207 | function createHtml5VideoContextMenus() { 208 | chrome.contextMenus.create({ 209 | title: "Play now", 210 | contexts: ["video"], 211 | onclick: function (info) { 212 | doAction(actions.Stop, function () { 213 | clearPlaylist(function () { 214 | addItemsToPlaylist([ 215 | {"contentType": 'video', "pluginPath": info.srcUrl} 216 | ], function (result) { 217 | }); 218 | }) 219 | }); 220 | } 221 | }, onContextMenuCreated); 222 | 223 | chrome.contextMenus.create({ 224 | title: "Queue", 225 | contexts: ["video"], 226 | onclick: function (info) { 227 | addItemsToPlaylist([ 228 | {"contentType": 'video', "pluginPath": info.srcUrl} 229 | ], function (result) { 230 | }); 231 | } 232 | }, onContextMenuCreated); 233 | 234 | chrome.contextMenus.create({ 235 | title: "Play this Next", 236 | contexts: ["video"], 237 | onclick: function (info) { 238 | getPlaylistPosition(function (position) { 239 | insertItemToPlaylist('video', info.srcUrl, position + 1, function (result) { 240 | }); 241 | }); 242 | } 243 | }, onContextMenuCreated); 244 | 245 | chrome.contextMenus.create({ 246 | title: "Play now", 247 | contexts: ["audio"], 248 | onclick: function (info) { 249 | doAction(actions.Stop, function () { 250 | clearPlaylist(function () { 251 | addItemsToPlaylist([ 252 | {"contentType": 'audio', "pluginPath": info.srcUrl} 253 | ], function (result) { 254 | }); 255 | }) 256 | }); 257 | } 258 | }, onContextMenuCreated); 259 | 260 | chrome.contextMenus.create({ 261 | title: "Queue", 262 | contexts: ["audio"], 263 | onclick: function (info) { 264 | addItemsToPlaylist([ 265 | {"contentType": 'audio', "pluginPath": info.srcUrl} 266 | ], function (result) { 267 | }); 268 | } 269 | }, onContextMenuCreated); 270 | 271 | chrome.contextMenus.create({ 272 | title: "Play this Next", 273 | contexts: ["audio"], 274 | onclick: function (info) { 275 | getPlaylistPosition(function (position) { 276 | insertItemToPlaylist('audio', info.srcUrl, position + 1, function (result) { 277 | }); 278 | }); 279 | } 280 | }, onContextMenuCreated); 281 | } 282 | 283 | function createMagnetAndP2PAndImageContextMenus() { 284 | chrome.contextMenus.create({ 285 | title: "Show Image", 286 | contexts: ["image"], 287 | onclick: function (info) { 288 | var url = info.srcUrl; 289 | wakeScreen(function () { 290 | addItemsToPlaylist([ 291 | {"contentType": 'picture', "pluginPath": url} 292 | ], function () { 293 | }); 294 | }); 295 | } 296 | }, onContextMenuCreated); 297 | 298 | chrome.contextMenus.create({ 299 | title: "Play now", 300 | contexts: ["link"], 301 | targetUrlPatterns: ['magnet:*', 'acestream:*', 'sop:*'], 302 | onclick: function (info) { 303 | doAction(actions.Stop, function () { 304 | clearPlaylist(function () { 305 | queueItem(info.linkUrl, function () { 306 | }); 307 | }) 308 | }); 309 | } 310 | }, onContextMenuCreated); 311 | 312 | chrome.contextMenus.create({ 313 | title: "Queue", 314 | contexts: ["link"], 315 | targetUrlPatterns: ['magnet:*', 'acestream:*', 'sop:*'], 316 | onclick: function (info) { 317 | queueItem(info.linkUrl, function () { 318 | }); 319 | } 320 | }, onContextMenuCreated); 321 | 322 | chrome.contextMenus.create({ 323 | title: "Play this Next", 324 | contexts: ["link"], 325 | targetUrlPatterns: ['magnet:*', 'acestream:*', 'sop:*'], 326 | onclick: function (info) { 327 | getPlaylistPosition(function (position) { 328 | insertItem(info.linkUrl, position + 1, function () { 329 | }); 330 | }); 331 | } 332 | }, onContextMenuCreated); 333 | } 334 | 335 | chrome.contextMenus.removeAll(); 336 | createMagnetAndP2PAndImageContextMenus(); 337 | createHtml5VideoContextMenus(); 338 | 339 | -------------------------------------------------------------------------------- /js/options.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | checkVersion(); 3 | populateProfiles(); 4 | restoreOptions(); 5 | document.querySelector('#saveBtn').addEventListener('click', saveOptions); 6 | $('#newProfileBtn').click(function(){createNewProfile()}); 7 | $('#deleteProfileBtn').click(function(){deleteThisProfile()}); 8 | $('#enableMultiHost').change(function(){ 9 | localStorage.setItem(storageKeys.enableMultiHost, $(this).prop('checked')); 10 | populateProfiles(); 11 | }); 12 | $('#enableDebugLogs').change(function() { 13 | chrome.runtime.sendMessage({action: 'setLogging', enable: $(this).prop('checked')}, function (response) {}); 14 | }); 15 | $('#paypalDonate').click(function() { 16 | goToPaypal(); 17 | }); 18 | }); 19 | 20 | function showAlertMessage(status, message) { 21 | status.html(message); 22 | status.show(); 23 | setTimeout(function() { 24 | status.fadeOut("fast"); 25 | }, 3000); 26 | } 27 | 28 | // Saves options to localStorage. 29 | function saveOptions() { 30 | var status = $("#status"); 31 | var profiles = $('#profiles'); 32 | var urlControlGroup = $('#urlControlGroup'); 33 | var portControlGroup = $('#portControlGroup'); 34 | var selectedProfile = profiles.val(); 35 | 36 | var url = document.getElementById("url").value; 37 | var port = document.getElementById("port").value; 38 | var username = document.getElementById("username").value; 39 | var password = document.getElementById("password").value; 40 | 41 | if (url && port && url != '' && port != '') { 42 | if (isMultiHostEnabled()) { 43 | saveProfile(); 44 | } else { 45 | localStorage.setItem("url", url); 46 | localStorage.setItem("port", port); 47 | localStorage.setItem("username", username); 48 | localStorage.setItem("password", password); 49 | } 50 | 51 | // Update status to let user know options were saved 52 | showAlertMessage(status, "Options Saved"); 53 | urlControlGroup.removeClass('error'); 54 | portControlGroup.removeClass('error'); 55 | urlControlGroup.find('.controls').find('.help-inline').remove(); 56 | portControlGroup.find('.controls').find('.help-inline').remove(); 57 | 58 | localStorage.setItem(storageKeys.showRepeat, $('#showRepeat').val()); 59 | localStorage.setItem(storageKeys.magnetAddOn, $('#magnetAddOn').val()); 60 | localStorage.setItem(storageKeys.enableMultiHost, $('#enableMultiHost').prop('checked')); 61 | localStorage.setItem(storageKeys.enableDebugLogs, $('#enableDebugLogs').prop('checked')); 62 | 63 | // Update status to let user know options were saved 64 | showAlertMessage(status, "Options Saved"); 65 | 66 | //Show the previously selected profile 67 | populateProfiles(function() { 68 | profiles.val(selectedProfile); 69 | changeProfile(); 70 | }); 71 | 72 | } else { 73 | urlControlGroup.addClass('error'); 74 | portControlGroup.addClass('error'); 75 | urlControlGroup.find('.controls').append('Required'); 76 | portControlGroup.find('.controls').append('Required'); 77 | } 78 | } 79 | 80 | // Restores select box state to saved value from localStorage. 81 | function restoreOptions() { 82 | if (isMultiHostEnabled()) { 83 | changeProfile(); 84 | } else { 85 | restoreUrl(); 86 | } 87 | 88 | if (isMultiHostEnabled()) { 89 | $('#enableMultiHost').prop("checked", true); 90 | } else { 91 | $('#enableMultiHost').prop("checked", false); 92 | } 93 | 94 | if (isDebugLogsEnabled()) { 95 | $('#enableDebugLogs').prop("checked", true); 96 | } else { 97 | $('#enableDebugLogs').prop("checked", false); 98 | } 99 | 100 | var showRepeat = localStorage[storageKeys.showRepeat]; 101 | $('#showRepeat').val(showRepeat); 102 | var magnetAddOn = localStorage[storageKeys.magnetAddOn]; 103 | $('#magnetAddOn').val(magnetAddOn); 104 | } 105 | 106 | function restoreUrl() { 107 | if (isMultiHostEnabled()) { 108 | changeProfile(); 109 | } else { 110 | var url = localStorage["url"]; 111 | var port = localStorage["port"]; 112 | var username = localStorage["username"]; 113 | var password = localStorage["password"]; 114 | var showRepeat = localStorage[storageKeys.showRepeat]; 115 | var magnetAddOn = localStorage[storageKeys.magnetAddOn]; 116 | 117 | if (!url || !port) { 118 | return; 119 | } 120 | document.getElementById("url").value = url; 121 | document.getElementById("port").value = port; 122 | if (username && password) { 123 | document.getElementById("username").value = username; 124 | document.getElementById("password").value = password; 125 | } 126 | } 127 | 128 | if (isMultiHostEnabled()) { 129 | $('#enableMultiHost').prop("checked", true); 130 | } else { 131 | $('#enableMultiHost').prop("checked", false); 132 | } 133 | 134 | $('#showRepeat').val(showRepeat); 135 | $('#magnetAddOn').val(magnetAddOn); 136 | } 137 | 138 | function checkVersion() { 139 | var storageVersion = localStorage["storage-version"]; 140 | 141 | if (storageVersion == null) { 142 | localStorage.setItem("storage-version", 0); 143 | storageVersion = 0; 144 | } 145 | 146 | if (storageVersion < currentVersion) { 147 | doUpgrade(storageVersion, currentVersion); 148 | localStorage.setItem("storage-version", currentVersion); 149 | } 150 | } 151 | 152 | function doUpgrade(from, to) { 153 | if (from < 1310) { 154 | var storageUrl = localStorage["url"]; 155 | var storagePort = localStorage["port"]; 156 | var storageUsername = localStorage["username"]; 157 | var storagePassword = localStorage["password"]; 158 | 159 | var profiles = []; 160 | var profile; 161 | 162 | if (storageUrl != null && storagePort != null && storageUrl != '' && storagePort != '') { 163 | profile = { 164 | "id": 0, 165 | "name": 'Default', 166 | "url": storageUrl, 167 | "port": storagePort, 168 | "username": storageUsername, 169 | "password": storagePassword 170 | }; 171 | } else { 172 | profile = { 173 | "id": 0, 174 | "name": 'Default', 175 | "url": '', 176 | "port": '', 177 | "username": '', 178 | "password": '' 179 | }; 180 | } 181 | 182 | profiles.push(profile); 183 | 184 | localStorage.setItem(storageKeys.profiles, JSON.stringify(profiles)); 185 | localStorage.setItem(storageKeys.selectedHost, 0); 186 | } 187 | } 188 | 189 | function saveProfile() { 190 | var profileId = $('#profiles').val(); 191 | var allProfilesObj = getAllProfiles(); 192 | var allProfiles; 193 | 194 | if (allProfilesObj != null) { 195 | allProfiles = JSON.parse(allProfilesObj); 196 | 197 | for (var i = 0; i < allProfiles.length; i++) { 198 | var profile = allProfiles[i]; 199 | if (profile.id == profileId) { 200 | profile.name = document.getElementById("name").value; 201 | profile.url = document.getElementById("url").value; 202 | profile.port = document.getElementById("port").value; 203 | profile.username = document.getElementById("username").value; 204 | profile.password = document.getElementById("password").value; 205 | 206 | break; 207 | } 208 | } 209 | } else { 210 | allProfiles = [{ 211 | id:0, 212 | name: document.getElementById("name").value, 213 | "url": document.getElementById("url").value, 214 | "port": document.getElementById("port").value, 215 | "username": document.getElementById("username").value, 216 | "password": document.getElementById("password").value 217 | }]; 218 | } 219 | 220 | localStorage.setItem(storageKeys.profiles, JSON.stringify(allProfiles)); 221 | } 222 | 223 | function changeProfile() { 224 | if (isMultiHostEnabled()) { 225 | var profileId = $('#profiles').val(); 226 | var allProfiles = JSON.parse(getAllProfiles()); 227 | 228 | for (var i = 0; i < allProfiles.length; i++) { 229 | var profile = allProfiles[i]; 230 | if (profile.id == profileId) { 231 | document.getElementById("name").value = profile.name; 232 | document.getElementById("url").value = profile.url; 233 | document.getElementById("port").value = profile.port; 234 | document.getElementById("username").value = profile.username; 235 | document.getElementById("password").value = profile.password; 236 | break; 237 | } 238 | } 239 | } 240 | } 241 | 242 | function populateProfiles(callback) { 243 | var profiles = $('#profiles'); 244 | var allProfilesObj = getAllProfiles(); 245 | 246 | profiles.change(function(){ 247 | changeProfile(); 248 | }); 249 | 250 | 251 | if (allProfilesObj != null) { 252 | var allProfiles = JSON.parse(allProfilesObj); 253 | 254 | profiles.children().each(function() {$(this).remove()}); 255 | 256 | for (var i=0; i' + profile.name + ''); 259 | } 260 | } else { 261 | if (isMultiHostEnabled()) { 262 | profiles.append(''); 263 | document.getElementById("name").value = 'Default'; 264 | document.getElementById("url").value = ''; 265 | document.getElementById("port").value = ''; 266 | document.getElementById("username").value = ''; 267 | document.getElementById("password").value = ''; 268 | } 269 | 270 | } 271 | 272 | if (isMultiHostEnabled()) { 273 | $('.profile-group').show(); 274 | changeProfile(); 275 | } else { 276 | $('.profile-group').hide(); 277 | restoreUrl(); 278 | } 279 | 280 | if (callback) { 281 | callback(); 282 | } 283 | } 284 | 285 | function createNewProfile() { 286 | var allProfiles = JSON.parse(getAllProfiles()); 287 | var largestId = 0; 288 | 289 | for (var i = 0; i < allProfiles.length; i++) { 290 | var profile = allProfiles[i]; 291 | if (profile.id > largestId) { 292 | largestId = profile.id; 293 | } 294 | } 295 | 296 | allProfiles.push({ 297 | id:largestId+1, 298 | name:'New Profile', 299 | "url": '', 300 | "port": '', 301 | "username": '', 302 | "password": '' 303 | }); 304 | 305 | localStorage.setItem(storageKeys.profiles, JSON.stringify(allProfiles)); 306 | populateProfiles(); 307 | $('#profiles').val(largestId+1); 308 | changeProfile(); 309 | } 310 | 311 | function deleteThisProfile() { 312 | var allProfiles = JSON.parse(getAllProfiles()); 313 | var profiles = $('#profiles'); 314 | var selectedId = profiles.val(); 315 | var indexToRemove = -1; 316 | 317 | for (var i = 0; i < allProfiles.length; i++) { 318 | var profile = allProfiles[i]; 319 | if (profile.id == selectedId) { 320 | indexToRemove = i; 321 | break; 322 | } 323 | } 324 | 325 | allProfiles.splice(indexToRemove, 1); 326 | 327 | localStorage.setItem(storageKeys.profiles, JSON.stringify(allProfiles)); 328 | populateProfiles(); 329 | profiles.val(allProfiles[0].id); 330 | } 331 | 332 | function goToPaypal() { 333 | var encrypted = '-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAGkbWt45jJovCBuzEYtYWrgd9VjRBA0hgP6SIRUKjUsX5nvyxMwduTYd6rS5qwCl9UV8VQpkusEcXUj9wRgRZWjfcB4w6POo8a5QZ+jhvZvUbCsQ6LevfuFth69TC6LheGIrujpMxeK1JTplNjqaEUDS2qPKFWTAFXUL2vrN/lMzELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI37QkT3oZCCmAgaAAsuyS7bH14okSVpHYlflAQ5MvCQrcV3XsLFzVJgKPlLOv4cWXAlFyI5vgY3cLUhTKryNduwokYc9OcBvXCCvihr2iGAVLR6wdzjiu8ahRYrLdGAllBEgilyXI+jIj8UfX5USZTr3+s0clDaj/DIiJx2IWzSNUhi97brdd78XOoqNPsRV1BZvtHRoD3Jgb9pmLvc7JKuLSZqH2oBnXAyifoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTQwMTIwMTIzMTQ4WjAjBgkqhkiG9w0BCQQxFgQU8qRUkO4XqK/o6H37geTVlfpyCpwwDQYJKoZIhvcNAQEBBQAEgYCxG7tTzN1pghJ147RMKHVSlAXJQHwm8DvSWyqEjfUe3HTFKYeJUlG63ICte0LD2sRQugTNL6DIpSV8Lm/0OaNFyNMpn7eGUwiu01Dt0VMNRG2ug9r7/5UQdTKJvSLQUJpuMHu2KT/YqfQD///AMqeklYeq3bSCB/hbQG+gUxwGtw==-----END PKCS7-----'; 334 | var cmd = '_s-xclick'; 335 | var url = 'https://www.paypal.com/cgi-bin/webscr?' + 'cmd=' + encodeURIComponent(cmd) + '&encrypted=' + encodeURIComponent(encrypted); 336 | 337 | window.open(url, '_blank'); 338 | } -------------------------------------------------------------------------------- /css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.1.1 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /css/jquery-ui-1.11.4.theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | * 11 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px 12 | */ 13 | 14 | 15 | /* Component containers 16 | ----------------------------------*/ 17 | .ui-widget { 18 | font-family: Verdana,Arial,sans-serif; 19 | font-size: 1.1em; 20 | } 21 | .ui-widget .ui-widget { 22 | font-size: 1em; 23 | } 24 | .ui-widget input, 25 | .ui-widget select, 26 | .ui-widget textarea, 27 | .ui-widget button { 28 | font-family: Verdana,Arial,sans-serif; 29 | font-size: 1em; 30 | } 31 | .ui-widget-content { 32 | border: 1px solid #aaaaaa; 33 | background: #ffffff url("../images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x; 34 | color: #222222; 35 | } 36 | .ui-widget-content a { 37 | color: #222222; 38 | } 39 | .ui-widget-header { 40 | border: 1px solid #aaaaaa; 41 | background: #cccccc url("../images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x; 42 | color: #222222; 43 | font-weight: bold; 44 | } 45 | .ui-widget-header a { 46 | color: #222222; 47 | } 48 | 49 | /* Interaction states 50 | ----------------------------------*/ 51 | .ui-state-default, 52 | .ui-widget-content .ui-state-default, 53 | .ui-widget-header .ui-state-default { 54 | border: 1px solid #d3d3d3; 55 | background: #e6e6e6 url("../images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x; 56 | font-weight: normal; 57 | color: #555555; 58 | } 59 | .ui-state-default a, 60 | .ui-state-default a:link, 61 | .ui-state-default a:visited { 62 | color: #555555; 63 | text-decoration: none; 64 | } 65 | .ui-state-hover, 66 | .ui-widget-content .ui-state-hover, 67 | .ui-widget-header .ui-state-hover, 68 | .ui-state-focus, 69 | .ui-widget-content .ui-state-focus, 70 | .ui-widget-header .ui-state-focus { 71 | border: 1px solid #999999; 72 | background: #dadada url("../images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x; 73 | font-weight: normal; 74 | color: #212121; 75 | } 76 | .ui-state-hover a, 77 | .ui-state-hover a:hover, 78 | .ui-state-hover a:link, 79 | .ui-state-hover a:visited, 80 | .ui-state-focus a, 81 | .ui-state-focus a:hover, 82 | .ui-state-focus a:link, 83 | .ui-state-focus a:visited { 84 | color: #212121; 85 | text-decoration: none; 86 | } 87 | .ui-state-active, 88 | .ui-widget-content .ui-state-active, 89 | .ui-widget-header .ui-state-active { 90 | border: 1px solid #aaaaaa; 91 | background: #ffffff url("../images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; 92 | font-weight: normal; 93 | color: #212121; 94 | } 95 | .ui-state-active a, 96 | .ui-state-active a:link, 97 | .ui-state-active a:visited { 98 | color: #212121; 99 | text-decoration: none; 100 | } 101 | 102 | /* Interaction Cues 103 | ----------------------------------*/ 104 | .ui-state-highlight, 105 | .ui-widget-content .ui-state-highlight, 106 | .ui-widget-header .ui-state-highlight { 107 | border: 1px solid #fcefa1; 108 | background: #fbf9ee url("../images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x; 109 | color: #363636; 110 | } 111 | .ui-state-highlight a, 112 | .ui-widget-content .ui-state-highlight a, 113 | .ui-widget-header .ui-state-highlight a { 114 | color: #363636; 115 | } 116 | .ui-state-error, 117 | .ui-widget-content .ui-state-error, 118 | .ui-widget-header .ui-state-error { 119 | border: 1px solid #cd0a0a; 120 | background: #fef1ec url("../images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x; 121 | color: #cd0a0a; 122 | } 123 | .ui-state-error a, 124 | .ui-widget-content .ui-state-error a, 125 | .ui-widget-header .ui-state-error a { 126 | color: #cd0a0a; 127 | } 128 | .ui-state-error-text, 129 | .ui-widget-content .ui-state-error-text, 130 | .ui-widget-header .ui-state-error-text { 131 | color: #cd0a0a; 132 | } 133 | .ui-priority-primary, 134 | .ui-widget-content .ui-priority-primary, 135 | .ui-widget-header .ui-priority-primary { 136 | font-weight: bold; 137 | } 138 | .ui-priority-secondary, 139 | .ui-widget-content .ui-priority-secondary, 140 | .ui-widget-header .ui-priority-secondary { 141 | opacity: .7; 142 | filter:Alpha(Opacity=70); /* support: IE8 */ 143 | font-weight: normal; 144 | } 145 | .ui-state-disabled, 146 | .ui-widget-content .ui-state-disabled, 147 | .ui-widget-header .ui-state-disabled { 148 | opacity: .35; 149 | filter:Alpha(Opacity=35); /* support: IE8 */ 150 | background-image: none; 151 | } 152 | .ui-state-disabled .ui-icon { 153 | filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ 154 | } 155 | 156 | /* Icons 157 | ----------------------------------*/ 158 | 159 | /* states and images */ 160 | .ui-icon { 161 | width: 16px; 162 | height: 16px; 163 | } 164 | .ui-icon, 165 | .ui-widget-content .ui-icon { 166 | background-image: url("../images/ui-icons_222222_256x240.png"); 167 | } 168 | .ui-widget-header .ui-icon { 169 | background-image: url("../images/ui-icons_222222_256x240.png"); 170 | } 171 | .ui-state-default .ui-icon { 172 | background-image: url("../images/ui-icons_888888_256x240.png"); 173 | } 174 | .ui-state-hover .ui-icon, 175 | .ui-state-focus .ui-icon { 176 | background-image: url("../images/ui-icons_454545_256x240.png"); 177 | } 178 | .ui-state-active .ui-icon { 179 | background-image: url("../images/ui-icons_454545_256x240.png"); 180 | } 181 | .ui-state-highlight .ui-icon { 182 | background-image: url("../images/ui-icons_2e83ff_256x240.png"); 183 | } 184 | .ui-state-error .ui-icon, 185 | .ui-state-error-text .ui-icon { 186 | background-image: url("../images/ui-icons_cd0a0a_256x240.png"); 187 | } 188 | 189 | /* positioning */ 190 | .ui-icon-blank { background-position: 16px 16px; } 191 | .ui-icon-carat-1-n { background-position: 0 0; } 192 | .ui-icon-carat-1-ne { background-position: -16px 0; } 193 | .ui-icon-carat-1-e { background-position: -32px 0; } 194 | .ui-icon-carat-1-se { background-position: -48px 0; } 195 | .ui-icon-carat-1-s { background-position: -64px 0; } 196 | .ui-icon-carat-1-sw { background-position: -80px 0; } 197 | .ui-icon-carat-1-w { background-position: -96px 0; } 198 | .ui-icon-carat-1-nw { background-position: -112px 0; } 199 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 200 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 201 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 202 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 203 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 204 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 205 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 206 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 207 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 208 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 209 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 210 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 211 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 212 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 213 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 214 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 215 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 216 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 217 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 218 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 219 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 220 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 221 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 222 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 223 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 224 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 225 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 226 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 227 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 228 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 229 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 230 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 231 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 232 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 233 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 234 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 235 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 236 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 237 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 238 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 239 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 240 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 241 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 242 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 243 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 244 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 245 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 246 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 247 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 248 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 249 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 250 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 251 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 252 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 253 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 254 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 255 | .ui-icon-arrow-4 { background-position: 0 -80px; } 256 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 257 | .ui-icon-extlink { background-position: -32px -80px; } 258 | .ui-icon-newwin { background-position: -48px -80px; } 259 | .ui-icon-refresh { background-position: -64px -80px; } 260 | .ui-icon-shuffle { background-position: -80px -80px; } 261 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 262 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 263 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 264 | .ui-icon-folder-open { background-position: -16px -96px; } 265 | .ui-icon-document { background-position: -32px -96px; } 266 | .ui-icon-document-b { background-position: -48px -96px; } 267 | .ui-icon-note { background-position: -64px -96px; } 268 | .ui-icon-mail-closed { background-position: -80px -96px; } 269 | .ui-icon-mail-open { background-position: -96px -96px; } 270 | .ui-icon-suitcase { background-position: -112px -96px; } 271 | .ui-icon-comment { background-position: -128px -96px; } 272 | .ui-icon-person { background-position: -144px -96px; } 273 | .ui-icon-print { background-position: -160px -96px; } 274 | .ui-icon-trash { background-position: -176px -96px; } 275 | .ui-icon-locked { background-position: -192px -96px; } 276 | .ui-icon-unlocked { background-position: -208px -96px; } 277 | .ui-icon-bookmark { background-position: -224px -96px; } 278 | .ui-icon-tag { background-position: -240px -96px; } 279 | .ui-icon-home { background-position: 0 -112px; } 280 | .ui-icon-flag { background-position: -16px -112px; } 281 | .ui-icon-calendar { background-position: -32px -112px; } 282 | .ui-icon-cart { background-position: -48px -112px; } 283 | .ui-icon-pencil { background-position: -64px -112px; } 284 | .ui-icon-clock { background-position: -80px -112px; } 285 | .ui-icon-disk { background-position: -96px -112px; } 286 | .ui-icon-calculator { background-position: -112px -112px; } 287 | .ui-icon-zoomin { background-position: -128px -112px; } 288 | .ui-icon-zoomout { background-position: -144px -112px; } 289 | .ui-icon-search { background-position: -160px -112px; } 290 | .ui-icon-wrench { background-position: -176px -112px; } 291 | .ui-icon-gear { background-position: -192px -112px; } 292 | .ui-icon-heart { background-position: -208px -112px; } 293 | .ui-icon-star { background-position: -224px -112px; } 294 | .ui-icon-link { background-position: -240px -112px; } 295 | .ui-icon-cancel { background-position: 0 -128px; } 296 | .ui-icon-plus { background-position: -16px -128px; } 297 | .ui-icon-plusthick { background-position: -32px -128px; } 298 | .ui-icon-minus { background-position: -48px -128px; } 299 | .ui-icon-minusthick { background-position: -64px -128px; } 300 | .ui-icon-close { background-position: -80px -128px; } 301 | .ui-icon-closethick { background-position: -96px -128px; } 302 | .ui-icon-key { background-position: -112px -128px; } 303 | .ui-icon-lightbulb { background-position: -128px -128px; } 304 | .ui-icon-scissors { background-position: -144px -128px; } 305 | .ui-icon-clipboard { background-position: -160px -128px; } 306 | .ui-icon-copy { background-position: -176px -128px; } 307 | .ui-icon-contact { background-position: -192px -128px; } 308 | .ui-icon-image { background-position: -208px -128px; } 309 | .ui-icon-video { background-position: -224px -128px; } 310 | .ui-icon-script { background-position: -240px -128px; } 311 | .ui-icon-alert { background-position: 0 -144px; } 312 | .ui-icon-info { background-position: -16px -144px; } 313 | .ui-icon-notice { background-position: -32px -144px; } 314 | .ui-icon-help { background-position: -48px -144px; } 315 | .ui-icon-check { background-position: -64px -144px; } 316 | .ui-icon-bullet { background-position: -80px -144px; } 317 | .ui-icon-radio-on { background-position: -96px -144px; } 318 | .ui-icon-radio-off { background-position: -112px -144px; } 319 | .ui-icon-pin-w { background-position: -128px -144px; } 320 | .ui-icon-pin-s { background-position: -144px -144px; } 321 | .ui-icon-play { background-position: 0 -160px; } 322 | .ui-icon-pause { background-position: -16px -160px; } 323 | .ui-icon-seek-next { background-position: -32px -160px; } 324 | .ui-icon-seek-prev { background-position: -48px -160px; } 325 | .ui-icon-seek-end { background-position: -64px -160px; } 326 | .ui-icon-seek-start { background-position: -80px -160px; } 327 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 328 | .ui-icon-seek-first { background-position: -80px -160px; } 329 | .ui-icon-stop { background-position: -96px -160px; } 330 | .ui-icon-eject { background-position: -112px -160px; } 331 | .ui-icon-volume-off { background-position: -128px -160px; } 332 | .ui-icon-volume-on { background-position: -144px -160px; } 333 | .ui-icon-power { background-position: 0 -176px; } 334 | .ui-icon-signal-diag { background-position: -16px -176px; } 335 | .ui-icon-signal { background-position: -32px -176px; } 336 | .ui-icon-battery-0 { background-position: -48px -176px; } 337 | .ui-icon-battery-1 { background-position: -64px -176px; } 338 | .ui-icon-battery-2 { background-position: -80px -176px; } 339 | .ui-icon-battery-3 { background-position: -96px -176px; } 340 | .ui-icon-circle-plus { background-position: 0 -192px; } 341 | .ui-icon-circle-minus { background-position: -16px -192px; } 342 | .ui-icon-circle-close { background-position: -32px -192px; } 343 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 344 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 345 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 346 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 347 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 348 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 349 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 350 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 351 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 352 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 353 | .ui-icon-circle-check { background-position: -208px -192px; } 354 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 355 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 356 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 357 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 358 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 359 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 360 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 361 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 362 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 363 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 364 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 365 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 366 | 367 | 368 | /* Misc visuals 369 | ----------------------------------*/ 370 | 371 | /* Corner radius */ 372 | .ui-corner-all, 373 | .ui-corner-top, 374 | .ui-corner-left, 375 | .ui-corner-tl { 376 | border-top-left-radius: 4px; 377 | } 378 | .ui-corner-all, 379 | .ui-corner-top, 380 | .ui-corner-right, 381 | .ui-corner-tr { 382 | border-top-right-radius: 4px; 383 | } 384 | .ui-corner-all, 385 | .ui-corner-bottom, 386 | .ui-corner-left, 387 | .ui-corner-bl { 388 | border-bottom-left-radius: 4px; 389 | } 390 | .ui-corner-all, 391 | .ui-corner-bottom, 392 | .ui-corner-right, 393 | .ui-corner-br { 394 | border-bottom-right-radius: 4px; 395 | } 396 | 397 | /* Overlays */ 398 | .ui-widget-overlay { 399 | background: #aaaaaa url("../images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; 400 | opacity: .3; 401 | filter: Alpha(Opacity=30); /* support: IE8 */ 402 | } 403 | .ui-widget-shadow { 404 | margin: -8px 0 0 -8px; 405 | padding: 8px; 406 | background: #aaaaaa url("../images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; 407 | opacity: .3; 408 | filter: Alpha(Opacity=30); /* support: IE8 */ 409 | border-radius: 8px; 410 | } 411 | -------------------------------------------------------------------------------- /js/xbmc-helper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handy curl command: 3 | * curl -i -X POST --header Content-Type:"application/json" -d '' http://localhost:8085/jsonrpc 4 | */ 5 | 6 | var debugLogsEnabled = localStorage[storageKeys.enableDebugLogs] == 'true'; 7 | 8 | function getSiteName(url) { 9 | if (url.match("magnet:")) { 10 | return "magnet" 11 | } 12 | var typeRegex = '(https|http)://(www\.)?([^\.]+)\.([^/]+).+'; 13 | return url.match(typeRegex)[3]; 14 | } 15 | 16 | function getPluginPath(url, callback) { 17 | if (debugLogsEnabled) console.log("Number of modules available: " + allModules.length); 18 | var foundModule = false; 19 | for (var i = 0; i < allModules.length; i++) { 20 | var module = allModules[i]; 21 | if (module.canHandleUrl(url)) { 22 | foundModule = true; 23 | if (debugLogsEnabled) console.log("Found module to handle url: " + url); 24 | 25 | module.getPluginPath(url, getAddOnVersion, function(path) { 26 | if (debugLogsEnabled) console.log("Path to play media: " + path); 27 | callback(module.getMediaType(), path); 28 | }); 29 | } 30 | } 31 | 32 | if (debugLogsEnabled && !foundModule) console.log("No module found to handle url: " + url + ""); 33 | } 34 | 35 | function getAddOnVersion(addonId, callback) { 36 | var json = '{"jsonrpc": "2.0", "method": "Addons.GetAddonDetails", "params": {"addonid": "' + addonId + '", "properties": ["version"]}, "id": 1}'; 37 | ajaxPost(json, function(response) { 38 | callback(response.result.addon.version); 39 | }); 40 | } 41 | 42 | function queueItem(url, callback) { 43 | getPluginPath(url, function (contentType, pluginPath) { 44 | addItemsToPlaylist([ 45 | {"contentType": contentType, "pluginPath": pluginPath} 46 | ], function (result) { 47 | callback(result); 48 | }); 49 | }); 50 | } 51 | 52 | function queueItems(tabUrl, urlList, callback) { 53 | var contentArr = []; 54 | var name = getSiteName(tabUrl); 55 | $.each(urlList, function (i, item) { 56 | var url = item; 57 | switch (name) { 58 | case 'youtube': 59 | getPluginPath(url, function (contentType, pluginPath) { 60 | var element = {"contentType": contentType, "pluginPath": pluginPath}; 61 | contentArr.push(element); 62 | // do we have the whole items. 63 | if (contentArr.length == urlList.length) { 64 | addItemsToPlaylist(contentArr, function (result) { 65 | callback(result); 66 | }); 67 | } 68 | }); 69 | break; 70 | 71 | case 'soundcloud': 72 | SoundcloudModule.getPluginPath(url, function(path) { 73 | var element = {"contentType": 'audio', "pluginPath": path}; 74 | contentArr.push(element); 75 | if (contentArr.length == urlList.length) { 76 | addItemsToPlaylist(contentArr, function (result) { 77 | callback(result); 78 | }); 79 | } 80 | }); 81 | break; 82 | } 83 | }); 84 | } 85 | 86 | function insertItem(url, position, callback) { 87 | getPluginPath(url, function (contentType, pluginPath) { 88 | insertItemToPlaylist(contentType, pluginPath, position, function (result) { 89 | callback(result); 90 | }); 91 | }); 92 | } 93 | 94 | function ajaxPost(data, callback, timeout) { 95 | var url = getURL(); 96 | var fullPath = url + "/jsonrpc"; 97 | var credentials = getCredentials(); 98 | var defaultTimeout = 5000; 99 | if (timeout) { 100 | defaultTimeout = timeout; 101 | } 102 | if (debugLogsEnabled) { 103 | console.log("POST " + data); 104 | } 105 | 106 | jQuery.ajax({ 107 | type: 'POST', 108 | url: fullPath, 109 | success: function (response) { 110 | if (debugLogsEnabled) { 111 | console.log(response); 112 | } 113 | callback(response); 114 | }, 115 | contentType: "application/json", 116 | data: data, 117 | dataType: 'json', 118 | timeout: defaultTimeout, 119 | username: credentials[0], 120 | password: credentials[1], 121 | error: function (jqXHR, textStatus, erroThrown) { 122 | callback(0); 123 | }, 124 | beforeSend: function(xhr, settings){ 125 | xhr.mozBackgroundRequest = true; 126 | } 127 | }); 128 | } 129 | 130 | function getSoundcloudTrackId(url, callback) { 131 | var soundcloudRegex = 'url=.+tracks%2F([^&]+).+'; 132 | jQuery.ajax({ 133 | type: 'POST', 134 | url: 'http://soundcloud.com/oembed?url=' + url, 135 | success: function (result) { 136 | var iframetext = $(result).find("html").text(); 137 | if (iframetext.indexOf('tracks') && iframetext.match(soundcloudRegex)) { 138 | var trackId = iframetext.match(soundcloudRegex)[1]; 139 | 140 | callback(trackId); 141 | } else { 142 | callback(null); 143 | } 144 | } 145 | }); 146 | } 147 | 148 | function validUrl(url) { 149 | for (var i = 0; i < allModules.length; i++) { 150 | var module = allModules[i]; 151 | if (module.canHandleUrl(url)) { 152 | return true; 153 | } 154 | } 155 | 156 | return false; 157 | } 158 | 159 | function validPlaylistUrl(url) { 160 | for (var i = 0; i < validPlaylistPatterns.length; i++) { 161 | var pattern = validPlaylistPatterns[i]; 162 | if (url.match(pattern)) { 163 | return true; 164 | } 165 | } 166 | 167 | return false; 168 | } 169 | 170 | function validVideoPage(url, callback) { 171 | if (validUrl(url)) { 172 | callback(); 173 | } else { 174 | chrome.tabs.query({active: true,lastFocusedWindow: true}, function (tab) { 175 | tab = tab[0]; 176 | chrome.tabs.sendMessage(tab.id, {action: 'isValid'}, function (response) { 177 | if (response) { 178 | callback(); 179 | } 180 | }); 181 | }); 182 | } 183 | } 184 | 185 | function clearPlaylist(callback) { 186 | var clearVideoPlaylist = '{"jsonrpc": "2.0", "method": "Playlist.Clear", "params":{"playlistid":1}, "id": 1}'; 187 | var clearAudioPlaylist = '{"jsonrpc": "2.0", "method": "Playlist.Clear", "params":{"playlistid":0}, "id": 1}'; 188 | 189 | ajaxPost(clearVideoPlaylist, function () { 190 | ajaxPost(clearAudioPlaylist, function (response) { 191 | callback(response); 192 | }); 193 | }); 194 | } 195 | 196 | function addItemsToPlaylist(items, callback, resumeTime) { 197 | if (!items || items.length <= 0) { 198 | callback(null); 199 | return; 200 | } 201 | // assuming all of the same type 202 | var contentType = items[0].contentType; 203 | if (contentType != 'picture') { 204 | getPlaylistId(contentType, function (playlistId) { 205 | getActivePlayerId(function (playerId) { 206 | //if nothing is playing, clear the playlist 207 | if (playerId == null) { 208 | clearPlaylist(function() {}); 209 | } 210 | var addToPlaylist = "["; 211 | for (var i = 0; i < items.length; i++) { 212 | if (i > 0) { 213 | addToPlaylist += ","; 214 | } 215 | addToPlaylist += '{"jsonrpc": "2.0", "method": "Playlist.Add", "params":{"playlistid":' + playlistId + ', "item" :{ "file" : "' + items[i].pluginPath + '" }}, "id" :' + (i + 1) + '}'; 216 | } 217 | addToPlaylist += "]"; 218 | 219 | ajaxPost(addToPlaylist, function (response) { 220 | var resume = ''; 221 | if (resumeTime) { 222 | var hours = Math.floor(resumeTime / 3600); 223 | var minutes = Math.floor((resumeTime % 3600) / 60); 224 | var seconds = Math.floor((resumeTime % 3600) % 60); 225 | resume = ', "value":{"hours":' + hours + ', "minutes":' + minutes + ', "seconds":' + seconds + '}'; 226 | } 227 | var playVideo = '{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item":{"playlistid":' + playlistId + ', "position" : 0}' + resume + '}, "id": 1}'; 228 | 229 | //if nothing is playing, play what we inserted 230 | if (playerId == null) { 231 | ajaxPost(playVideo, function (response_2) { 232 | callback(response_2); 233 | }, 10000); 234 | } else { 235 | callback(response); 236 | } 237 | }); 238 | }); 239 | }); 240 | } else { 241 | var playImage = '{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item":{ "file" : "' + items[0].pluginPath + '" }}, "id": 1}'; 242 | ajaxPost(playImage, function () {}); 243 | } 244 | } 245 | 246 | function insertItemToPlaylist(contentType, pluginPath, position, callback) { 247 | getPlaylistId(contentType, function (playlistId) { 248 | var insertToPlaylist = '{"jsonrpc": "2.0", "method": "Playlist.Insert", "params":{"playlistid":' + playlistId + ', "position": ' + position + ', "item" :{ "file" : "' + pluginPath + '" }}, "id" : 1}'; 249 | 250 | ajaxPost(insertToPlaylist, function (response) { 251 | callback(response); 252 | }); 253 | }); 254 | } 255 | 256 | function removeItemFromPlaylist(position, callback) { 257 | getActivePlayerId(function (playlistId) { 258 | var removeFromPlaylist = '{"jsonrpc": "2.0", "method": "Playlist.Remove", "params":{"playlistid":' + playlistId + ', "position": ' + position + '}, "id" : 1}'; 259 | 260 | ajaxPost(removeFromPlaylist, function (response) { 261 | callback(response); 262 | }); 263 | }); 264 | } 265 | 266 | function getActivePlayerId(callback) { 267 | var getActivePlayers = '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}'; 268 | 269 | ajaxPost(getActivePlayers, function (response) { 270 | if (response && response.result.length > 0) { 271 | var playerid = response.result[0].playerid; 272 | var type = response.result[0].type; 273 | callback(playerid, type); 274 | } else { 275 | callback(null, null); 276 | } 277 | }); 278 | } 279 | 280 | function clearNonPlayingPlaylist(callback) { 281 | getActivePlayerId(function (playerid) { 282 | if (playerid == null) { 283 | //If nothing is playing, clear the list, probably left over from before 284 | clearPlaylist(function () { 285 | }); 286 | } 287 | callback(); 288 | }); 289 | } 290 | 291 | function playerSeek(value) { 292 | var hours = Math.floor(value / 3600); 293 | var minutes = Math.floor((value % 3600) / 60); 294 | var seconds = Math.floor((value % 3600) % 60); 295 | getActivePlayerId(function (playerid) { 296 | if (playerid != null) { 297 | var playerseek = '{"jsonrpc":"2.0", "method":"Player.Seek", "params":{"playerid":' + playerid + ', "value":{"hours":' + hours + ', "minutes":' + minutes + ', "seconds":' + seconds + '}},"id":1}'; 298 | ajaxPost(playerseek, function () { 299 | onChangeUpdate(); 300 | }); 301 | } 302 | }); 303 | } 304 | 305 | function playerGoPrevious(callback) { 306 | getActivePlayerId(function (playerid) { 307 | if (playerid != null) { 308 | var version = localStorage["jsonVersion"]; 309 | var playerPreviousV6 = '{"jsonrpc": "2.0", "method": "Player.GoTo", "params":{"playerid":' + playerid + ', "to":"previous"}, "id" : 1}'; 310 | 311 | if (version >= 6) { 312 | ajaxPost(playerPreviousV6, function () { 313 | callback() 314 | }, 10000); 315 | 316 | } else if (version >= 4) { 317 | doAction(actions.GoPrevious, function () { 318 | callback() 319 | }); 320 | 321 | } 322 | } 323 | }); 324 | } 325 | 326 | function playerGoNext(callback) { 327 | getActivePlayerId(function (playerid) { 328 | if (playerid != null) { 329 | var version = localStorage["jsonVersion"]; 330 | var playerNextV6 = '{"jsonrpc": "2.0", "method": "Player.GoTo", "params":{"playerid":' + playerid + ', "to":"next"}, "id" : 1}'; 331 | 332 | if (version >= 6) { 333 | ajaxPost(playerNextV6, function () { 334 | callback() 335 | }, 10000); 336 | 337 | } else if (version >= 4) { 338 | doAction(actions.GoNext, function () { 339 | callback() 340 | }); 341 | 342 | } 343 | } 344 | }); 345 | } 346 | 347 | function navigate(type) { 348 | var navigateTo = '{"jsonrpc": "2.0", "method": "Input.' + type + '", "id": 1}'; 349 | 350 | ajaxPost(navigateTo, function () { 351 | }, 1000); 352 | } 353 | 354 | function getXbmcJsonVersion(callback) { 355 | var getJsonVersion = '{"jsonrpc": "2.0", "method": "JSONRPC.Version", "id" : 1}'; 356 | 357 | ajaxPost(getJsonVersion, function (response) { 358 | if (response && response.result) { 359 | var version = response.result.version.major; 360 | if (!version) { 361 | version = response.result.version; 362 | } 363 | callback(version); 364 | } else { 365 | callback(null); 366 | } 367 | }, 2000); 368 | } 369 | 370 | function getRepeatMode(callback) { 371 | getActivePlayerId(function (playerid) { 372 | if (playerid != null) { 373 | var playerRepeat = '{"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{"playerid":' + playerid + ', "properties":["repeat"]}, "id" : 1}'; 374 | 375 | ajaxPost(playerRepeat, function (response) { 376 | if (response && response.result && response.result.repeat) { 377 | callback(response.result.repeat); 378 | } else { 379 | callback(null); 380 | } 381 | }); 382 | } else { 383 | callback(null); 384 | } 385 | }); 386 | } 387 | 388 | function getSpeed(callback) { 389 | getActivePlayerId(function (playerid) { 390 | if (playerid != null) { 391 | var playerRepeat = '{"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{"playerid":' + playerid + ', "properties":["speed"]}, "id" : 1}'; 392 | 393 | ajaxPost(playerRepeat, function (response) { 394 | if (response && response.result && response.result.speed) { 395 | callback(response.result.speed); 396 | } else { 397 | callback(null); 398 | } 399 | }); 400 | } else { 401 | callback(null); 402 | } 403 | }); 404 | } 405 | 406 | function setRepeatMode(mode, callback) { 407 | getActivePlayerId(function (playerid) { 408 | if (playerid != null) { 409 | var playerSetRepeatV6 = '{"jsonrpc": "2.0", "method": "Player.SetRepeat", "params":{"playerid":' + playerid + ', "repeat":"' + mode + '"}, "id" : 1}'; 410 | var playerSetRepeatV4 = '{"jsonrpc": "2.0", "method": "Player.Repeat", "params":{"playerid":' + playerid + ', "state":"' + mode + '"}, "id" : 1}'; 411 | 412 | var version = localStorage["jsonVersion"]; 413 | 414 | if (version >= 6) { 415 | ajaxPost(playerSetRepeatV6, function (response) { 416 | callback(response); 417 | }); 418 | 419 | } else if (version >= 4) { 420 | ajaxPost(playerSetRepeatV4, function (response) { 421 | callback(response); 422 | }); 423 | 424 | } else { 425 | callback(null); 426 | } 427 | } else { 428 | callback(null); 429 | } 430 | }); 431 | } 432 | 433 | function getPlaylistPosition(callback) { 434 | 435 | getActivePlayerId(function (playerid) { 436 | if (playerid != null) { 437 | var getQueuePosition = '{"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{"playerid":' + playerid + ', "properties":["position"]}, "id" : 1}'; 438 | 439 | ajaxPost(getQueuePosition, function (response) { 440 | if (response && response.result) { 441 | var position = response.result.position; 442 | callback(position); 443 | } 444 | }); 445 | } else { 446 | callback(null); 447 | } 448 | }); 449 | } 450 | 451 | function getActivePlaylistSize(callback) { 452 | getActivePlayerId(function (playerid, type) { 453 | if (playerid != null && type != null) { 454 | getPlaylistId(type, function (playlistId) { 455 | if (playlistId != null) { 456 | getPlaylistSize(playlistId, function (playlistSize) { 457 | if (playlistSize != null) { 458 | callback(playlistSize); 459 | } else { 460 | callback(null); 461 | } 462 | }); 463 | } else { 464 | callback(null); 465 | } 466 | }); 467 | } else { 468 | callback(null); 469 | } 470 | }); 471 | } 472 | 473 | function getPlaylistSize(playlistId, callback) { 474 | var getCurrentPlaylist = '{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params":{"playlistid":' + playlistId + '}, "id": 1}'; 475 | 476 | ajaxPost(getCurrentPlaylist, function (response) { 477 | if (response && response.result && response.result.items) { 478 | var playlistSize = response.result.items.length; 479 | callback(playlistSize); 480 | } else { 481 | callback(null); 482 | } 483 | }); 484 | } 485 | 486 | function getPlaylistId(type, callback) { 487 | var getPlaylistId = '{"jsonrpc": "2.0", "method": "Playlist.GetPlaylists", "id": 1}'; 488 | 489 | ajaxPost(getPlaylistId, function (response) { 490 | if (response && response.result.length > 0) { 491 | var playlists = response.result; 492 | for (var i = 0; i < playlists.length; i++) { 493 | if (playlists[i].type == type) { 494 | callback(playlists[i].playlistid); 495 | } 496 | } 497 | } else { 498 | callback(null); 499 | } 500 | }); 501 | } 502 | 503 | function getVolumeLevel(callback) { 504 | var getVolumeLevel = '{"jsonrpc": "2.0", "method": "Application.GetProperties", "params":{"properties":["volume"]}, "id" : 1}'; 505 | 506 | ajaxPost(getVolumeLevel, function (response) { 507 | if (response && response.result) { 508 | callback(response.result["volume"]); 509 | } else { 510 | callback(null); 511 | } 512 | }); 513 | } 514 | 515 | function getPlayerTimes(playerId, callback) { 516 | var getPlayerTimes = '{"jsonrpc":"2.0", "method":"Player.GetProperties", "params":{"playerid":' + playerId + ', "properties":["time", "totaltime"]},"id":1}'; 517 | 518 | ajaxPost(getPlayerTimes, function(response) { 519 | if (response && response.result) { 520 | var timeInSeconds = toSeconds(response.result.time["hours"], response.result.time["minutes"], response.result.time["seconds"]); 521 | var totalTimeInSeconds = toSeconds(response.result.totaltime["hours"], response.result.totaltime["minutes"], response.result.totaltime["seconds"]); 522 | 523 | callback( 524 | timeInSeconds, 525 | totalTimeInSeconds 526 | ); 527 | } else { 528 | callback(null); 529 | } 530 | }); 531 | } 532 | 533 | function wakeScreen(callback) { 534 | var doNothing = '{"jsonrpc":"2.0", "method":"Input.ExecuteAction", "params":{"action":"noop"},"id":1}'; 535 | 536 | ajaxPost(doNothing, function(response) { 537 | if (response && response.result == 'OK') { 538 | callback(); 539 | } 540 | }); 541 | } 542 | 543 | function toSeconds(hours, minutes, seconds) { 544 | var secondsInHour = 3600; 545 | var secondsInMinute = 60; 546 | var totalSeconds = 0; 547 | 548 | totalSeconds = seconds + (minutes*secondsInMinute) + (hours*secondsInHour); 549 | 550 | return totalSeconds 551 | } 552 | 553 | function resume(currentTime, callback){ 554 | getSpeed(function(speed) { 555 | if (speed > 0) { 556 | setTimeout(function(){playerSeek(currentTime);},1000) 557 | } 558 | else{ 559 | resume(currentTime, callback); 560 | } 561 | }); 562 | } 563 | 564 | -------------------------------------------------------------------------------- /css/jquery-ui-1.11.4.structure.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | 12 | /* Layout helpers 13 | ----------------------------------*/ 14 | .ui-helper-hidden { 15 | display: none; 16 | } 17 | .ui-helper-hidden-accessible { 18 | border: 0; 19 | clip: rect(0 0 0 0); 20 | height: 1px; 21 | margin: -1px; 22 | overflow: hidden; 23 | padding: 0; 24 | position: absolute; 25 | width: 1px; 26 | } 27 | .ui-helper-reset { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | outline: 0; 32 | line-height: 1.3; 33 | text-decoration: none; 34 | font-size: 100%; 35 | list-style: none; 36 | } 37 | .ui-helper-clearfix:before, 38 | .ui-helper-clearfix:after { 39 | content: ""; 40 | display: table; 41 | border-collapse: collapse; 42 | } 43 | .ui-helper-clearfix:after { 44 | clear: both; 45 | } 46 | .ui-helper-clearfix { 47 | min-height: 0; /* support: IE7 */ 48 | } 49 | .ui-helper-zfix { 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | position: absolute; 55 | opacity: 0; 56 | filter:Alpha(Opacity=0); /* support: IE8 */ 57 | } 58 | 59 | .ui-front { 60 | z-index: 100; 61 | } 62 | 63 | 64 | /* Interaction Cues 65 | ----------------------------------*/ 66 | .ui-state-disabled { 67 | cursor: default !important; 68 | } 69 | 70 | 71 | /* Icons 72 | ----------------------------------*/ 73 | 74 | /* states and images */ 75 | .ui-icon { 76 | display: block; 77 | text-indent: -99999px; 78 | overflow: hidden; 79 | background-repeat: no-repeat; 80 | } 81 | 82 | 83 | /* Misc visuals 84 | ----------------------------------*/ 85 | 86 | /* Overlays */ 87 | .ui-widget-overlay { 88 | position: fixed; 89 | top: 0; 90 | left: 0; 91 | width: 100%; 92 | height: 100%; 93 | } 94 | .ui-draggable-handle { 95 | -ms-touch-action: none; 96 | touch-action: none; 97 | } 98 | .ui-resizable { 99 | position: relative; 100 | } 101 | .ui-resizable-handle { 102 | position: absolute; 103 | font-size: 0.1px; 104 | display: block; 105 | -ms-touch-action: none; 106 | touch-action: none; 107 | } 108 | .ui-resizable-disabled .ui-resizable-handle, 109 | .ui-resizable-autohide .ui-resizable-handle { 110 | display: none; 111 | } 112 | .ui-resizable-n { 113 | cursor: n-resize; 114 | height: 7px; 115 | width: 100%; 116 | top: -5px; 117 | left: 0; 118 | } 119 | .ui-resizable-s { 120 | cursor: s-resize; 121 | height: 7px; 122 | width: 100%; 123 | bottom: -5px; 124 | left: 0; 125 | } 126 | .ui-resizable-e { 127 | cursor: e-resize; 128 | width: 7px; 129 | right: -5px; 130 | top: 0; 131 | height: 100%; 132 | } 133 | .ui-resizable-w { 134 | cursor: w-resize; 135 | width: 7px; 136 | left: -5px; 137 | top: 0; 138 | height: 100%; 139 | } 140 | .ui-resizable-se { 141 | cursor: se-resize; 142 | width: 12px; 143 | height: 12px; 144 | right: 1px; 145 | bottom: 1px; 146 | } 147 | .ui-resizable-sw { 148 | cursor: sw-resize; 149 | width: 9px; 150 | height: 9px; 151 | left: -5px; 152 | bottom: -5px; 153 | } 154 | .ui-resizable-nw { 155 | cursor: nw-resize; 156 | width: 9px; 157 | height: 9px; 158 | left: -5px; 159 | top: -5px; 160 | } 161 | .ui-resizable-ne { 162 | cursor: ne-resize; 163 | width: 9px; 164 | height: 9px; 165 | right: -5px; 166 | top: -5px; 167 | } 168 | .ui-selectable { 169 | -ms-touch-action: none; 170 | touch-action: none; 171 | } 172 | .ui-selectable-helper { 173 | position: absolute; 174 | z-index: 100; 175 | border: 1px dotted black; 176 | } 177 | .ui-sortable-handle { 178 | -ms-touch-action: none; 179 | touch-action: none; 180 | } 181 | .ui-accordion .ui-accordion-header { 182 | display: block; 183 | cursor: pointer; 184 | position: relative; 185 | margin: 2px 0 0 0; 186 | padding: .5em .5em .5em .7em; 187 | min-height: 0; /* support: IE7 */ 188 | font-size: 100%; 189 | } 190 | .ui-accordion .ui-accordion-icons { 191 | padding-left: 2.2em; 192 | } 193 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 194 | padding-left: 2.2em; 195 | } 196 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 197 | position: absolute; 198 | left: .5em; 199 | top: 50%; 200 | margin-top: -8px; 201 | } 202 | .ui-accordion .ui-accordion-content { 203 | padding: 1em 2.2em; 204 | border-top: 0; 205 | overflow: auto; 206 | } 207 | .ui-autocomplete { 208 | position: absolute; 209 | top: 0; 210 | left: 0; 211 | cursor: default; 212 | } 213 | .ui-button { 214 | display: inline-block; 215 | position: relative; 216 | padding: 0; 217 | line-height: normal; 218 | margin-right: .1em; 219 | cursor: pointer; 220 | vertical-align: middle; 221 | text-align: center; 222 | overflow: visible; /* removes extra width in IE */ 223 | } 224 | .ui-button, 225 | .ui-button:link, 226 | .ui-button:visited, 227 | .ui-button:hover, 228 | .ui-button:active { 229 | text-decoration: none; 230 | } 231 | /* to make room for the icon, a width needs to be set here */ 232 | .ui-button-icon-only { 233 | width: 2.2em; 234 | } 235 | /* button elements seem to need a little more width */ 236 | button.ui-button-icon-only { 237 | width: 2.4em; 238 | } 239 | .ui-button-icons-only { 240 | width: 3.4em; 241 | } 242 | button.ui-button-icons-only { 243 | width: 3.7em; 244 | } 245 | 246 | /* button text element */ 247 | .ui-button .ui-button-text { 248 | display: block; 249 | line-height: normal; 250 | } 251 | .ui-button-text-only .ui-button-text { 252 | padding: .4em 1em; 253 | } 254 | .ui-button-icon-only .ui-button-text, 255 | .ui-button-icons-only .ui-button-text { 256 | padding: .4em; 257 | text-indent: -9999999px; 258 | } 259 | .ui-button-text-icon-primary .ui-button-text, 260 | .ui-button-text-icons .ui-button-text { 261 | padding: .4em 1em .4em 2.1em; 262 | } 263 | .ui-button-text-icon-secondary .ui-button-text, 264 | .ui-button-text-icons .ui-button-text { 265 | padding: .4em 2.1em .4em 1em; 266 | } 267 | .ui-button-text-icons .ui-button-text { 268 | padding-left: 2.1em; 269 | padding-right: 2.1em; 270 | } 271 | /* no icon support for input elements, provide padding by default */ 272 | input.ui-button { 273 | padding: .4em 1em; 274 | } 275 | 276 | /* button icon element(s) */ 277 | .ui-button-icon-only .ui-icon, 278 | .ui-button-text-icon-primary .ui-icon, 279 | .ui-button-text-icon-secondary .ui-icon, 280 | .ui-button-text-icons .ui-icon, 281 | .ui-button-icons-only .ui-icon { 282 | position: absolute; 283 | top: 50%; 284 | margin-top: -8px; 285 | } 286 | .ui-button-icon-only .ui-icon { 287 | left: 50%; 288 | margin-left: -8px; 289 | } 290 | .ui-button-text-icon-primary .ui-button-icon-primary, 291 | .ui-button-text-icons .ui-button-icon-primary, 292 | .ui-button-icons-only .ui-button-icon-primary { 293 | left: .5em; 294 | } 295 | .ui-button-text-icon-secondary .ui-button-icon-secondary, 296 | .ui-button-text-icons .ui-button-icon-secondary, 297 | .ui-button-icons-only .ui-button-icon-secondary { 298 | right: .5em; 299 | } 300 | 301 | /* button sets */ 302 | .ui-buttonset { 303 | margin-right: 7px; 304 | } 305 | .ui-buttonset .ui-button { 306 | margin-left: 0; 307 | margin-right: -.3em; 308 | } 309 | 310 | /* workarounds */ 311 | /* reset extra padding in Firefox, see h5bp.com/l */ 312 | input.ui-button::-moz-focus-inner, 313 | button.ui-button::-moz-focus-inner { 314 | border: 0; 315 | padding: 0; 316 | } 317 | .ui-datepicker { 318 | width: 17em; 319 | padding: .2em .2em 0; 320 | display: none; 321 | } 322 | .ui-datepicker .ui-datepicker-header { 323 | position: relative; 324 | padding: .2em 0; 325 | } 326 | .ui-datepicker .ui-datepicker-prev, 327 | .ui-datepicker .ui-datepicker-next { 328 | position: absolute; 329 | top: 2px; 330 | width: 1.8em; 331 | height: 1.8em; 332 | } 333 | .ui-datepicker .ui-datepicker-prev-hover, 334 | .ui-datepicker .ui-datepicker-next-hover { 335 | top: 1px; 336 | } 337 | .ui-datepicker .ui-datepicker-prev { 338 | left: 2px; 339 | } 340 | .ui-datepicker .ui-datepicker-next { 341 | right: 2px; 342 | } 343 | .ui-datepicker .ui-datepicker-prev-hover { 344 | left: 1px; 345 | } 346 | .ui-datepicker .ui-datepicker-next-hover { 347 | right: 1px; 348 | } 349 | .ui-datepicker .ui-datepicker-prev span, 350 | .ui-datepicker .ui-datepicker-next span { 351 | display: block; 352 | position: absolute; 353 | left: 50%; 354 | margin-left: -8px; 355 | top: 50%; 356 | margin-top: -8px; 357 | } 358 | .ui-datepicker .ui-datepicker-title { 359 | margin: 0 2.3em; 360 | line-height: 1.8em; 361 | text-align: center; 362 | } 363 | .ui-datepicker .ui-datepicker-title select { 364 | font-size: 1em; 365 | margin: 1px 0; 366 | } 367 | .ui-datepicker select.ui-datepicker-month, 368 | .ui-datepicker select.ui-datepicker-year { 369 | width: 45%; 370 | } 371 | .ui-datepicker table { 372 | width: 100%; 373 | font-size: .9em; 374 | border-collapse: collapse; 375 | margin: 0 0 .4em; 376 | } 377 | .ui-datepicker th { 378 | padding: .7em .3em; 379 | text-align: center; 380 | font-weight: bold; 381 | border: 0; 382 | } 383 | .ui-datepicker td { 384 | border: 0; 385 | padding: 1px; 386 | } 387 | .ui-datepicker td span, 388 | .ui-datepicker td a { 389 | display: block; 390 | padding: .2em; 391 | text-align: right; 392 | text-decoration: none; 393 | } 394 | .ui-datepicker .ui-datepicker-buttonpane { 395 | background-image: none; 396 | margin: .7em 0 0 0; 397 | padding: 0 .2em; 398 | border-left: 0; 399 | border-right: 0; 400 | border-bottom: 0; 401 | } 402 | .ui-datepicker .ui-datepicker-buttonpane button { 403 | float: right; 404 | margin: .5em .2em .4em; 405 | cursor: pointer; 406 | padding: .2em .6em .3em .6em; 407 | width: auto; 408 | overflow: visible; 409 | } 410 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { 411 | float: left; 412 | } 413 | 414 | /* with multiple calendars */ 415 | .ui-datepicker.ui-datepicker-multi { 416 | width: auto; 417 | } 418 | .ui-datepicker-multi .ui-datepicker-group { 419 | float: left; 420 | } 421 | .ui-datepicker-multi .ui-datepicker-group table { 422 | width: 95%; 423 | margin: 0 auto .4em; 424 | } 425 | .ui-datepicker-multi-2 .ui-datepicker-group { 426 | width: 50%; 427 | } 428 | .ui-datepicker-multi-3 .ui-datepicker-group { 429 | width: 33.3%; 430 | } 431 | .ui-datepicker-multi-4 .ui-datepicker-group { 432 | width: 25%; 433 | } 434 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, 435 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { 436 | border-left-width: 0; 437 | } 438 | .ui-datepicker-multi .ui-datepicker-buttonpane { 439 | clear: left; 440 | } 441 | .ui-datepicker-row-break { 442 | clear: both; 443 | width: 100%; 444 | font-size: 0; 445 | } 446 | 447 | /* RTL support */ 448 | .ui-datepicker-rtl { 449 | direction: rtl; 450 | } 451 | .ui-datepicker-rtl .ui-datepicker-prev { 452 | right: 2px; 453 | left: auto; 454 | } 455 | .ui-datepicker-rtl .ui-datepicker-next { 456 | left: 2px; 457 | right: auto; 458 | } 459 | .ui-datepicker-rtl .ui-datepicker-prev:hover { 460 | right: 1px; 461 | left: auto; 462 | } 463 | .ui-datepicker-rtl .ui-datepicker-next:hover { 464 | left: 1px; 465 | right: auto; 466 | } 467 | .ui-datepicker-rtl .ui-datepicker-buttonpane { 468 | clear: right; 469 | } 470 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { 471 | float: left; 472 | } 473 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, 474 | .ui-datepicker-rtl .ui-datepicker-group { 475 | float: right; 476 | } 477 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, 478 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { 479 | border-right-width: 0; 480 | border-left-width: 1px; 481 | } 482 | .ui-dialog { 483 | overflow: hidden; 484 | position: absolute; 485 | top: 0; 486 | left: 0; 487 | padding: .2em; 488 | outline: 0; 489 | } 490 | .ui-dialog .ui-dialog-titlebar { 491 | padding: .4em 1em; 492 | position: relative; 493 | } 494 | .ui-dialog .ui-dialog-title { 495 | float: left; 496 | margin: .1em 0; 497 | white-space: nowrap; 498 | width: 90%; 499 | overflow: hidden; 500 | text-overflow: ellipsis; 501 | } 502 | .ui-dialog .ui-dialog-titlebar-close { 503 | position: absolute; 504 | right: .3em; 505 | top: 50%; 506 | width: 20px; 507 | margin: -10px 0 0 0; 508 | padding: 1px; 509 | height: 20px; 510 | } 511 | .ui-dialog .ui-dialog-content { 512 | position: relative; 513 | border: 0; 514 | padding: .5em 1em; 515 | background: none; 516 | overflow: auto; 517 | } 518 | .ui-dialog .ui-dialog-buttonpane { 519 | text-align: left; 520 | border-width: 1px 0 0 0; 521 | background-image: none; 522 | margin-top: .5em; 523 | padding: .3em 1em .5em .4em; 524 | } 525 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 526 | float: right; 527 | } 528 | .ui-dialog .ui-dialog-buttonpane button { 529 | margin: .5em .4em .5em 0; 530 | cursor: pointer; 531 | } 532 | .ui-dialog .ui-resizable-se { 533 | width: 12px; 534 | height: 12px; 535 | right: -5px; 536 | bottom: -5px; 537 | background-position: 16px 16px; 538 | } 539 | .ui-draggable .ui-dialog-titlebar { 540 | cursor: move; 541 | } 542 | .ui-menu { 543 | list-style: none; 544 | padding: 0; 545 | margin: 0; 546 | display: block; 547 | outline: none; 548 | } 549 | .ui-menu .ui-menu { 550 | position: absolute; 551 | } 552 | .ui-menu .ui-menu-item { 553 | position: relative; 554 | margin: 0; 555 | padding: 3px 1em 3px .4em; 556 | cursor: pointer; 557 | min-height: 0; /* support: IE7 */ 558 | /* support: IE10, see #8844 */ 559 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 560 | } 561 | .ui-menu .ui-menu-divider { 562 | margin: 5px 0; 563 | height: 0; 564 | font-size: 0; 565 | line-height: 0; 566 | border-width: 1px 0 0 0; 567 | } 568 | .ui-menu .ui-state-focus, 569 | .ui-menu .ui-state-active { 570 | margin: -1px; 571 | } 572 | 573 | /* icon support */ 574 | .ui-menu-icons { 575 | position: relative; 576 | } 577 | .ui-menu-icons .ui-menu-item { 578 | padding-left: 2em; 579 | } 580 | 581 | /* left-aligned */ 582 | .ui-menu .ui-icon { 583 | position: absolute; 584 | top: 0; 585 | bottom: 0; 586 | left: .2em; 587 | margin: auto 0; 588 | } 589 | 590 | /* right-aligned */ 591 | .ui-menu .ui-menu-icon { 592 | left: auto; 593 | right: 0; 594 | } 595 | .ui-progressbar { 596 | height: 2em; 597 | text-align: left; 598 | overflow: hidden; 599 | } 600 | .ui-progressbar .ui-progressbar-value { 601 | margin: -1px; 602 | height: 100%; 603 | } 604 | .ui-progressbar .ui-progressbar-overlay { 605 | background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); 606 | height: 100%; 607 | filter: alpha(opacity=25); /* support: IE8 */ 608 | opacity: 0.25; 609 | } 610 | .ui-progressbar-indeterminate .ui-progressbar-value { 611 | background-image: none; 612 | } 613 | .ui-selectmenu-menu { 614 | padding: 0; 615 | margin: 0; 616 | position: absolute; 617 | top: 0; 618 | left: 0; 619 | display: none; 620 | } 621 | .ui-selectmenu-menu .ui-menu { 622 | overflow: auto; 623 | /* Support: IE7 */ 624 | overflow-x: hidden; 625 | padding-bottom: 1px; 626 | } 627 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { 628 | font-size: 1em; 629 | font-weight: bold; 630 | line-height: 1.5; 631 | padding: 2px 0.4em; 632 | margin: 0.5em 0 0 0; 633 | height: auto; 634 | border: 0; 635 | } 636 | .ui-selectmenu-open { 637 | display: block; 638 | } 639 | .ui-selectmenu-button { 640 | display: inline-block; 641 | overflow: hidden; 642 | position: relative; 643 | text-decoration: none; 644 | cursor: pointer; 645 | } 646 | .ui-selectmenu-button span.ui-icon { 647 | right: 0.5em; 648 | left: auto; 649 | margin-top: -8px; 650 | position: absolute; 651 | top: 50%; 652 | } 653 | .ui-selectmenu-button span.ui-selectmenu-text { 654 | text-align: left; 655 | padding: 0.4em 2.1em 0.4em 1em; 656 | display: block; 657 | line-height: 1.4; 658 | overflow: hidden; 659 | text-overflow: ellipsis; 660 | white-space: nowrap; 661 | } 662 | .ui-slider { 663 | position: relative; 664 | text-align: left; 665 | } 666 | .ui-slider .ui-slider-handle { 667 | position: absolute; 668 | z-index: 2; 669 | width: 1.2em; 670 | height: 1.2em; 671 | cursor: default; 672 | -ms-touch-action: none; 673 | touch-action: none; 674 | } 675 | .ui-slider .ui-slider-range { 676 | position: absolute; 677 | z-index: 1; 678 | font-size: .7em; 679 | display: block; 680 | border: 0; 681 | background-position: 0 0; 682 | } 683 | 684 | /* support: IE8 - See #6727 */ 685 | .ui-slider.ui-state-disabled .ui-slider-handle, 686 | .ui-slider.ui-state-disabled .ui-slider-range { 687 | filter: inherit; 688 | } 689 | 690 | .ui-slider-horizontal { 691 | height: .8em; 692 | } 693 | .ui-slider-horizontal .ui-slider-handle { 694 | top: -.3em; 695 | margin-left: -.6em; 696 | } 697 | .ui-slider-horizontal .ui-slider-range { 698 | top: 0; 699 | height: 100%; 700 | } 701 | .ui-slider-horizontal .ui-slider-range-min { 702 | left: 0; 703 | } 704 | .ui-slider-horizontal .ui-slider-range-max { 705 | right: 0; 706 | } 707 | 708 | .ui-slider-vertical { 709 | width: .8em; 710 | height: 100px; 711 | } 712 | .ui-slider-vertical .ui-slider-handle { 713 | left: -.3em; 714 | margin-left: 0; 715 | margin-bottom: -.6em; 716 | } 717 | .ui-slider-vertical .ui-slider-range { 718 | left: 0; 719 | width: 100%; 720 | } 721 | .ui-slider-vertical .ui-slider-range-min { 722 | bottom: 0; 723 | } 724 | .ui-slider-vertical .ui-slider-range-max { 725 | top: 0; 726 | } 727 | .ui-spinner { 728 | position: relative; 729 | display: inline-block; 730 | overflow: hidden; 731 | padding: 0; 732 | vertical-align: middle; 733 | } 734 | .ui-spinner-input { 735 | border: none; 736 | background: none; 737 | color: inherit; 738 | padding: 0; 739 | margin: .2em 0; 740 | vertical-align: middle; 741 | margin-left: .4em; 742 | margin-right: 22px; 743 | } 744 | .ui-spinner-button { 745 | width: 16px; 746 | height: 50%; 747 | font-size: .5em; 748 | padding: 0; 749 | margin: 0; 750 | text-align: center; 751 | position: absolute; 752 | cursor: default; 753 | display: block; 754 | overflow: hidden; 755 | right: 0; 756 | } 757 | /* more specificity required here to override default borders */ 758 | .ui-spinner a.ui-spinner-button { 759 | border-top: none; 760 | border-bottom: none; 761 | border-right: none; 762 | } 763 | /* vertically center icon */ 764 | .ui-spinner .ui-icon { 765 | position: absolute; 766 | margin-top: -8px; 767 | top: 50%; 768 | left: 0; 769 | } 770 | .ui-spinner-up { 771 | top: 0; 772 | } 773 | .ui-spinner-down { 774 | bottom: 0; 775 | } 776 | 777 | /* TR overrides */ 778 | .ui-spinner .ui-icon-triangle-1-s { 779 | /* need to fix icons sprite */ 780 | background-position: -65px -16px; 781 | } 782 | .ui-tabs { 783 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 784 | padding: .2em; 785 | } 786 | .ui-tabs .ui-tabs-nav { 787 | margin: 0; 788 | padding: .2em .2em 0; 789 | } 790 | .ui-tabs .ui-tabs-nav li { 791 | list-style: none; 792 | float: left; 793 | position: relative; 794 | top: 0; 795 | margin: 1px .2em 0 0; 796 | border-bottom-width: 0; 797 | padding: 0; 798 | white-space: nowrap; 799 | } 800 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 801 | float: left; 802 | padding: .5em 1em; 803 | text-decoration: none; 804 | } 805 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 806 | margin-bottom: -1px; 807 | padding-bottom: 1px; 808 | } 809 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 810 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 811 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 812 | cursor: text; 813 | } 814 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 815 | cursor: pointer; 816 | } 817 | .ui-tabs .ui-tabs-panel { 818 | display: block; 819 | border-width: 0; 820 | padding: 1em 1.4em; 821 | background: none; 822 | } 823 | .ui-tooltip { 824 | padding: 8px; 825 | position: absolute; 826 | z-index: 9999; 827 | max-width: 300px; 828 | -webkit-box-shadow: 0 0 5px #aaa; 829 | box-shadow: 0 0 5px #aaa; 830 | } 831 | body .ui-tooltip { 832 | border-width: 2px; 833 | } 834 | -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2012 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.chrome||e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); -------------------------------------------------------------------------------- /css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.1.1 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | .clearfix { 12 | *zoom: 1; 13 | } 14 | 15 | .clearfix:before, 16 | .clearfix:after { 17 | display: table; 18 | line-height: 0; 19 | content: ""; 20 | } 21 | 22 | .clearfix:after { 23 | clear: both; 24 | } 25 | 26 | .hide-text { 27 | font: 0/0 a; 28 | color: transparent; 29 | text-shadow: none; 30 | background-color: transparent; 31 | border: 0; 32 | } 33 | 34 | .input-block-level { 35 | display: block; 36 | width: 100%; 37 | min-height: 30px; 38 | -webkit-box-sizing: border-box; 39 | -moz-box-sizing: border-box; 40 | box-sizing: border-box; 41 | } 42 | 43 | .hidden { 44 | display: none; 45 | visibility: hidden; 46 | } 47 | 48 | .visible-phone { 49 | display: none !important; 50 | } 51 | 52 | .visible-tablet { 53 | display: none !important; 54 | } 55 | 56 | .hidden-desktop { 57 | display: none !important; 58 | } 59 | 60 | .visible-desktop { 61 | display: inherit !important; 62 | } 63 | 64 | @media (min-width: 768px) and (max-width: 979px) { 65 | .hidden-desktop { 66 | display: inherit !important; 67 | } 68 | .visible-desktop { 69 | display: none !important ; 70 | } 71 | .visible-tablet { 72 | display: inherit !important; 73 | } 74 | .hidden-tablet { 75 | display: none !important; 76 | } 77 | } 78 | 79 | @media (max-width: 767px) { 80 | .hidden-desktop { 81 | display: inherit !important; 82 | } 83 | .visible-desktop { 84 | display: none !important; 85 | } 86 | .visible-phone { 87 | display: inherit !important; 88 | } 89 | .hidden-phone { 90 | display: none !important; 91 | } 92 | } 93 | 94 | @media (min-width: 1200px) { 95 | .row { 96 | margin-left: -30px; 97 | *zoom: 1; 98 | } 99 | .row:before, 100 | .row:after { 101 | display: table; 102 | line-height: 0; 103 | content: ""; 104 | } 105 | .row:after { 106 | clear: both; 107 | } 108 | [class*="span"] { 109 | float: left; 110 | min-height: 1px; 111 | margin-left: 30px; 112 | } 113 | .container, 114 | .navbar-static-top .container, 115 | .navbar-fixed-top .container, 116 | .navbar-fixed-bottom .container { 117 | width: 1170px; 118 | } 119 | .span12 { 120 | width: 1170px; 121 | } 122 | .span11 { 123 | width: 1070px; 124 | } 125 | .span10 { 126 | width: 970px; 127 | } 128 | .span9 { 129 | width: 870px; 130 | } 131 | .span8 { 132 | width: 770px; 133 | } 134 | .span7 { 135 | width: 670px; 136 | } 137 | .span6 { 138 | width: 570px; 139 | } 140 | .span5 { 141 | width: 470px; 142 | } 143 | .span4 { 144 | width: 370px; 145 | } 146 | .span3 { 147 | width: 270px; 148 | } 149 | .span2 { 150 | width: 170px; 151 | } 152 | .span1 { 153 | width: 70px; 154 | } 155 | .offset12 { 156 | margin-left: 1230px; 157 | } 158 | .offset11 { 159 | margin-left: 1130px; 160 | } 161 | .offset10 { 162 | margin-left: 1030px; 163 | } 164 | .offset9 { 165 | margin-left: 930px; 166 | } 167 | .offset8 { 168 | margin-left: 830px; 169 | } 170 | .offset7 { 171 | margin-left: 730px; 172 | } 173 | .offset6 { 174 | margin-left: 630px; 175 | } 176 | .offset5 { 177 | margin-left: 530px; 178 | } 179 | .offset4 { 180 | margin-left: 430px; 181 | } 182 | .offset3 { 183 | margin-left: 330px; 184 | } 185 | .offset2 { 186 | margin-left: 230px; 187 | } 188 | .offset1 { 189 | margin-left: 130px; 190 | } 191 | .row-fluid { 192 | width: 100%; 193 | *zoom: 1; 194 | } 195 | .row-fluid:before, 196 | .row-fluid:after { 197 | display: table; 198 | line-height: 0; 199 | content: ""; 200 | } 201 | .row-fluid:after { 202 | clear: both; 203 | } 204 | .row-fluid [class*="span"] { 205 | display: block; 206 | float: left; 207 | width: 100%; 208 | min-height: 30px; 209 | margin-left: 2.564102564102564%; 210 | *margin-left: 2.5109110747408616%; 211 | -webkit-box-sizing: border-box; 212 | -moz-box-sizing: border-box; 213 | box-sizing: border-box; 214 | } 215 | .row-fluid [class*="span"]:first-child { 216 | margin-left: 0; 217 | } 218 | .row-fluid .span12 { 219 | width: 100%; 220 | *width: 99.94680851063829%; 221 | } 222 | .row-fluid .span11 { 223 | width: 91.45299145299145%; 224 | *width: 91.39979996362975%; 225 | } 226 | .row-fluid .span10 { 227 | width: 82.90598290598291%; 228 | *width: 82.8527914166212%; 229 | } 230 | .row-fluid .span9 { 231 | width: 74.35897435897436%; 232 | *width: 74.30578286961266%; 233 | } 234 | .row-fluid .span8 { 235 | width: 65.81196581196582%; 236 | *width: 65.75877432260411%; 237 | } 238 | .row-fluid .span7 { 239 | width: 57.26495726495726%; 240 | *width: 57.21176577559556%; 241 | } 242 | .row-fluid .span6 { 243 | width: 48.717948717948715%; 244 | *width: 48.664757228587014%; 245 | } 246 | .row-fluid .span5 { 247 | width: 40.17094017094017%; 248 | *width: 40.11774868157847%; 249 | } 250 | .row-fluid .span4 { 251 | width: 31.623931623931625%; 252 | *width: 31.570740134569924%; 253 | } 254 | .row-fluid .span3 { 255 | width: 23.076923076923077%; 256 | *width: 23.023731587561375%; 257 | } 258 | .row-fluid .span2 { 259 | width: 14.52991452991453%; 260 | *width: 14.476723040552828%; 261 | } 262 | .row-fluid .span1 { 263 | width: 5.982905982905983%; 264 | *width: 5.929714493544281%; 265 | } 266 | .row-fluid .offset12 { 267 | margin-left: 105.12820512820512%; 268 | *margin-left: 105.02182214948171%; 269 | } 270 | .row-fluid .offset12:first-child { 271 | margin-left: 102.56410256410257%; 272 | *margin-left: 102.45771958537915%; 273 | } 274 | .row-fluid .offset11 { 275 | margin-left: 96.58119658119658%; 276 | *margin-left: 96.47481360247316%; 277 | } 278 | .row-fluid .offset11:first-child { 279 | margin-left: 94.01709401709402%; 280 | *margin-left: 93.91071103837061%; 281 | } 282 | .row-fluid .offset10 { 283 | margin-left: 88.03418803418803%; 284 | *margin-left: 87.92780505546462%; 285 | } 286 | .row-fluid .offset10:first-child { 287 | margin-left: 85.47008547008548%; 288 | *margin-left: 85.36370249136206%; 289 | } 290 | .row-fluid .offset9 { 291 | margin-left: 79.48717948717949%; 292 | *margin-left: 79.38079650845607%; 293 | } 294 | .row-fluid .offset9:first-child { 295 | margin-left: 76.92307692307693%; 296 | *margin-left: 76.81669394435352%; 297 | } 298 | .row-fluid .offset8 { 299 | margin-left: 70.94017094017094%; 300 | *margin-left: 70.83378796144753%; 301 | } 302 | .row-fluid .offset8:first-child { 303 | margin-left: 68.37606837606839%; 304 | *margin-left: 68.26968539734497%; 305 | } 306 | .row-fluid .offset7 { 307 | margin-left: 62.393162393162385%; 308 | *margin-left: 62.28677941443899%; 309 | } 310 | .row-fluid .offset7:first-child { 311 | margin-left: 59.82905982905982%; 312 | *margin-left: 59.72267685033642%; 313 | } 314 | .row-fluid .offset6 { 315 | margin-left: 53.84615384615384%; 316 | *margin-left: 53.739770867430444%; 317 | } 318 | .row-fluid .offset6:first-child { 319 | margin-left: 51.28205128205128%; 320 | *margin-left: 51.175668303327875%; 321 | } 322 | .row-fluid .offset5 { 323 | margin-left: 45.299145299145295%; 324 | *margin-left: 45.1927623204219%; 325 | } 326 | .row-fluid .offset5:first-child { 327 | margin-left: 42.73504273504273%; 328 | *margin-left: 42.62865975631933%; 329 | } 330 | .row-fluid .offset4 { 331 | margin-left: 36.75213675213675%; 332 | *margin-left: 36.645753773413354%; 333 | } 334 | .row-fluid .offset4:first-child { 335 | margin-left: 34.18803418803419%; 336 | *margin-left: 34.081651209310785%; 337 | } 338 | .row-fluid .offset3 { 339 | margin-left: 28.205128205128204%; 340 | *margin-left: 28.0987452264048%; 341 | } 342 | .row-fluid .offset3:first-child { 343 | margin-left: 25.641025641025642%; 344 | *margin-left: 25.53464266230224%; 345 | } 346 | .row-fluid .offset2 { 347 | margin-left: 19.65811965811966%; 348 | *margin-left: 19.551736679396257%; 349 | } 350 | .row-fluid .offset2:first-child { 351 | margin-left: 17.094017094017094%; 352 | *margin-left: 16.98763411529369%; 353 | } 354 | .row-fluid .offset1 { 355 | margin-left: 11.11111111111111%; 356 | *margin-left: 11.004728132387708%; 357 | } 358 | .row-fluid .offset1:first-child { 359 | margin-left: 8.547008547008547%; 360 | *margin-left: 8.440625568285142%; 361 | } 362 | input, 363 | textarea, 364 | .uneditable-input { 365 | margin-left: 0; 366 | } 367 | .controls-row [class*="span"] + [class*="span"] { 368 | margin-left: 30px; 369 | } 370 | input.span12, 371 | textarea.span12, 372 | .uneditable-input.span12 { 373 | width: 1156px; 374 | } 375 | input.span11, 376 | textarea.span11, 377 | .uneditable-input.span11 { 378 | width: 1056px; 379 | } 380 | input.span10, 381 | textarea.span10, 382 | .uneditable-input.span10 { 383 | width: 956px; 384 | } 385 | input.span9, 386 | textarea.span9, 387 | .uneditable-input.span9 { 388 | width: 856px; 389 | } 390 | input.span8, 391 | textarea.span8, 392 | .uneditable-input.span8 { 393 | width: 756px; 394 | } 395 | input.span7, 396 | textarea.span7, 397 | .uneditable-input.span7 { 398 | width: 656px; 399 | } 400 | input.span6, 401 | textarea.span6, 402 | .uneditable-input.span6 { 403 | width: 556px; 404 | } 405 | input.span5, 406 | textarea.span5, 407 | .uneditable-input.span5 { 408 | width: 456px; 409 | } 410 | input.span4, 411 | textarea.span4, 412 | .uneditable-input.span4 { 413 | width: 356px; 414 | } 415 | input.span3, 416 | textarea.span3, 417 | .uneditable-input.span3 { 418 | width: 256px; 419 | } 420 | input.span2, 421 | textarea.span2, 422 | .uneditable-input.span2 { 423 | width: 156px; 424 | } 425 | input.span1, 426 | textarea.span1, 427 | .uneditable-input.span1 { 428 | width: 56px; 429 | } 430 | .thumbnails { 431 | margin-left: -30px; 432 | } 433 | .thumbnails > li { 434 | margin-left: 30px; 435 | } 436 | .row-fluid .thumbnails { 437 | margin-left: 0; 438 | } 439 | } 440 | 441 | @media (min-width: 768px) and (max-width: 979px) { 442 | .row { 443 | margin-left: -20px; 444 | *zoom: 1; 445 | } 446 | .row:before, 447 | .row:after { 448 | display: table; 449 | line-height: 0; 450 | content: ""; 451 | } 452 | .row:after { 453 | clear: both; 454 | } 455 | [class*="span"] { 456 | float: left; 457 | min-height: 1px; 458 | margin-left: 20px; 459 | } 460 | .container, 461 | .navbar-static-top .container, 462 | .navbar-fixed-top .container, 463 | .navbar-fixed-bottom .container { 464 | width: 724px; 465 | } 466 | .span12 { 467 | width: 724px; 468 | } 469 | .span11 { 470 | width: 662px; 471 | } 472 | .span10 { 473 | width: 600px; 474 | } 475 | .span9 { 476 | width: 538px; 477 | } 478 | .span8 { 479 | width: 476px; 480 | } 481 | .span7 { 482 | width: 414px; 483 | } 484 | .span6 { 485 | width: 352px; 486 | } 487 | .span5 { 488 | width: 290px; 489 | } 490 | .span4 { 491 | width: 228px; 492 | } 493 | .span3 { 494 | width: 166px; 495 | } 496 | .span2 { 497 | width: 104px; 498 | } 499 | .span1 { 500 | width: 42px; 501 | } 502 | .offset12 { 503 | margin-left: 764px; 504 | } 505 | .offset11 { 506 | margin-left: 702px; 507 | } 508 | .offset10 { 509 | margin-left: 640px; 510 | } 511 | .offset9 { 512 | margin-left: 578px; 513 | } 514 | .offset8 { 515 | margin-left: 516px; 516 | } 517 | .offset7 { 518 | margin-left: 454px; 519 | } 520 | .offset6 { 521 | margin-left: 392px; 522 | } 523 | .offset5 { 524 | margin-left: 330px; 525 | } 526 | .offset4 { 527 | margin-left: 268px; 528 | } 529 | .offset3 { 530 | margin-left: 206px; 531 | } 532 | .offset2 { 533 | margin-left: 144px; 534 | } 535 | .offset1 { 536 | margin-left: 82px; 537 | } 538 | .row-fluid { 539 | width: 100%; 540 | *zoom: 1; 541 | } 542 | .row-fluid:before, 543 | .row-fluid:after { 544 | display: table; 545 | line-height: 0; 546 | content: ""; 547 | } 548 | .row-fluid:after { 549 | clear: both; 550 | } 551 | .row-fluid [class*="span"] { 552 | display: block; 553 | float: left; 554 | width: 100%; 555 | min-height: 30px; 556 | margin-left: 2.7624309392265194%; 557 | *margin-left: 2.709239449864817%; 558 | -webkit-box-sizing: border-box; 559 | -moz-box-sizing: border-box; 560 | box-sizing: border-box; 561 | } 562 | .row-fluid [class*="span"]:first-child { 563 | margin-left: 0; 564 | } 565 | .row-fluid .span12 { 566 | width: 100%; 567 | *width: 99.94680851063829%; 568 | } 569 | .row-fluid .span11 { 570 | width: 91.43646408839778%; 571 | *width: 91.38327259903608%; 572 | } 573 | .row-fluid .span10 { 574 | width: 82.87292817679558%; 575 | *width: 82.81973668743387%; 576 | } 577 | .row-fluid .span9 { 578 | width: 74.30939226519337%; 579 | *width: 74.25620077583166%; 580 | } 581 | .row-fluid .span8 { 582 | width: 65.74585635359117%; 583 | *width: 65.69266486422946%; 584 | } 585 | .row-fluid .span7 { 586 | width: 57.18232044198895%; 587 | *width: 57.12912895262725%; 588 | } 589 | .row-fluid .span6 { 590 | width: 48.61878453038674%; 591 | *width: 48.56559304102504%; 592 | } 593 | .row-fluid .span5 { 594 | width: 40.05524861878453%; 595 | *width: 40.00205712942283%; 596 | } 597 | .row-fluid .span4 { 598 | width: 31.491712707182323%; 599 | *width: 31.43852121782062%; 600 | } 601 | .row-fluid .span3 { 602 | width: 22.92817679558011%; 603 | *width: 22.87498530621841%; 604 | } 605 | .row-fluid .span2 { 606 | width: 14.3646408839779%; 607 | *width: 14.311449394616199%; 608 | } 609 | .row-fluid .span1 { 610 | width: 5.801104972375691%; 611 | *width: 5.747913483013988%; 612 | } 613 | .row-fluid .offset12 { 614 | margin-left: 105.52486187845304%; 615 | *margin-left: 105.41847889972962%; 616 | } 617 | .row-fluid .offset12:first-child { 618 | margin-left: 102.76243093922652%; 619 | *margin-left: 102.6560479605031%; 620 | } 621 | .row-fluid .offset11 { 622 | margin-left: 96.96132596685082%; 623 | *margin-left: 96.8549429881274%; 624 | } 625 | .row-fluid .offset11:first-child { 626 | margin-left: 94.1988950276243%; 627 | *margin-left: 94.09251204890089%; 628 | } 629 | .row-fluid .offset10 { 630 | margin-left: 88.39779005524862%; 631 | *margin-left: 88.2914070765252%; 632 | } 633 | .row-fluid .offset10:first-child { 634 | margin-left: 85.6353591160221%; 635 | *margin-left: 85.52897613729868%; 636 | } 637 | .row-fluid .offset9 { 638 | margin-left: 79.8342541436464%; 639 | *margin-left: 79.72787116492299%; 640 | } 641 | .row-fluid .offset9:first-child { 642 | margin-left: 77.07182320441989%; 643 | *margin-left: 76.96544022569647%; 644 | } 645 | .row-fluid .offset8 { 646 | margin-left: 71.2707182320442%; 647 | *margin-left: 71.16433525332079%; 648 | } 649 | .row-fluid .offset8:first-child { 650 | margin-left: 68.50828729281768%; 651 | *margin-left: 68.40190431409427%; 652 | } 653 | .row-fluid .offset7 { 654 | margin-left: 62.70718232044199%; 655 | *margin-left: 62.600799341718584%; 656 | } 657 | .row-fluid .offset7:first-child { 658 | margin-left: 59.94475138121547%; 659 | *margin-left: 59.838368402492065%; 660 | } 661 | .row-fluid .offset6 { 662 | margin-left: 54.14364640883978%; 663 | *margin-left: 54.037263430116376%; 664 | } 665 | .row-fluid .offset6:first-child { 666 | margin-left: 51.38121546961326%; 667 | *margin-left: 51.27483249088986%; 668 | } 669 | .row-fluid .offset5 { 670 | margin-left: 45.58011049723757%; 671 | *margin-left: 45.47372751851417%; 672 | } 673 | .row-fluid .offset5:first-child { 674 | margin-left: 42.81767955801105%; 675 | *margin-left: 42.71129657928765%; 676 | } 677 | .row-fluid .offset4 { 678 | margin-left: 37.01657458563536%; 679 | *margin-left: 36.91019160691196%; 680 | } 681 | .row-fluid .offset4:first-child { 682 | margin-left: 34.25414364640884%; 683 | *margin-left: 34.14776066768544%; 684 | } 685 | .row-fluid .offset3 { 686 | margin-left: 28.45303867403315%; 687 | *margin-left: 28.346655695309746%; 688 | } 689 | .row-fluid .offset3:first-child { 690 | margin-left: 25.69060773480663%; 691 | *margin-left: 25.584224756083227%; 692 | } 693 | .row-fluid .offset2 { 694 | margin-left: 19.88950276243094%; 695 | *margin-left: 19.783119783707537%; 696 | } 697 | .row-fluid .offset2:first-child { 698 | margin-left: 17.12707182320442%; 699 | *margin-left: 17.02068884448102%; 700 | } 701 | .row-fluid .offset1 { 702 | margin-left: 11.32596685082873%; 703 | *margin-left: 11.219583872105325%; 704 | } 705 | .row-fluid .offset1:first-child { 706 | margin-left: 8.56353591160221%; 707 | *margin-left: 8.457152932878806%; 708 | } 709 | input, 710 | textarea, 711 | .uneditable-input { 712 | margin-left: 0; 713 | } 714 | .controls-row [class*="span"] + [class*="span"] { 715 | margin-left: 20px; 716 | } 717 | input.span12, 718 | textarea.span12, 719 | .uneditable-input.span12 { 720 | width: 710px; 721 | } 722 | input.span11, 723 | textarea.span11, 724 | .uneditable-input.span11 { 725 | width: 648px; 726 | } 727 | input.span10, 728 | textarea.span10, 729 | .uneditable-input.span10 { 730 | width: 586px; 731 | } 732 | input.span9, 733 | textarea.span9, 734 | .uneditable-input.span9 { 735 | width: 524px; 736 | } 737 | input.span8, 738 | textarea.span8, 739 | .uneditable-input.span8 { 740 | width: 462px; 741 | } 742 | input.span7, 743 | textarea.span7, 744 | .uneditable-input.span7 { 745 | width: 400px; 746 | } 747 | input.span6, 748 | textarea.span6, 749 | .uneditable-input.span6 { 750 | width: 338px; 751 | } 752 | input.span5, 753 | textarea.span5, 754 | .uneditable-input.span5 { 755 | width: 276px; 756 | } 757 | input.span4, 758 | textarea.span4, 759 | .uneditable-input.span4 { 760 | width: 214px; 761 | } 762 | input.span3, 763 | textarea.span3, 764 | .uneditable-input.span3 { 765 | width: 152px; 766 | } 767 | input.span2, 768 | textarea.span2, 769 | .uneditable-input.span2 { 770 | width: 90px; 771 | } 772 | input.span1, 773 | textarea.span1, 774 | .uneditable-input.span1 { 775 | width: 28px; 776 | } 777 | } 778 | 779 | @media (max-width: 767px) { 780 | body { 781 | padding-right: 20px; 782 | padding-left: 20px; 783 | } 784 | .navbar-fixed-top, 785 | .navbar-fixed-bottom, 786 | .navbar-static-top { 787 | margin-right: -20px; 788 | margin-left: -20px; 789 | } 790 | .container-fluid { 791 | padding: 0; 792 | } 793 | .dl-horizontal dt { 794 | float: none; 795 | width: auto; 796 | clear: none; 797 | text-align: left; 798 | } 799 | .dl-horizontal dd { 800 | margin-left: 0; 801 | } 802 | .container { 803 | width: auto; 804 | } 805 | .row-fluid { 806 | width: 100%; 807 | } 808 | .row, 809 | .thumbnails { 810 | margin-left: 0; 811 | } 812 | .thumbnails > li { 813 | float: none; 814 | margin-left: 0; 815 | } 816 | [class*="span"], 817 | .row-fluid [class*="span"] { 818 | display: block; 819 | float: none; 820 | width: 100%; 821 | margin-left: 0; 822 | -webkit-box-sizing: border-box; 823 | -moz-box-sizing: border-box; 824 | box-sizing: border-box; 825 | } 826 | .span12, 827 | .row-fluid .span12 { 828 | width: 100%; 829 | -webkit-box-sizing: border-box; 830 | -moz-box-sizing: border-box; 831 | box-sizing: border-box; 832 | } 833 | .input-large, 834 | .input-xlarge, 835 | .input-xxlarge, 836 | input[class*="span"], 837 | select[class*="span"], 838 | textarea[class*="span"], 839 | .uneditable-input { 840 | display: block; 841 | width: 100%; 842 | min-height: 30px; 843 | -webkit-box-sizing: border-box; 844 | -moz-box-sizing: border-box; 845 | box-sizing: border-box; 846 | } 847 | .input-prepend input, 848 | .input-append input, 849 | .input-prepend input[class*="span"], 850 | .input-append input[class*="span"] { 851 | display: inline-block; 852 | width: auto; 853 | } 854 | .controls-row [class*="span"] + [class*="span"] { 855 | margin-left: 0; 856 | } 857 | .modal { 858 | position: fixed; 859 | top: 20px; 860 | right: 20px; 861 | left: 20px; 862 | width: auto; 863 | margin: 0; 864 | } 865 | .modal.fade.in { 866 | top: auto; 867 | } 868 | } 869 | 870 | @media (max-width: 480px) { 871 | .nav-collapse { 872 | -webkit-transform: translate3d(0, 0, 0); 873 | } 874 | .page-header h1 small { 875 | display: block; 876 | line-height: 20px; 877 | } 878 | input[type="checkbox"], 879 | input[type="radio"] { 880 | border: 1px solid #ccc; 881 | } 882 | .form-horizontal .control-label { 883 | float: none; 884 | width: auto; 885 | padding-top: 0; 886 | text-align: left; 887 | } 888 | .form-horizontal .controls { 889 | margin-left: 0; 890 | } 891 | .form-horizontal .control-list { 892 | padding-top: 0; 893 | } 894 | .form-horizontal .form-actions { 895 | padding-right: 10px; 896 | padding-left: 10px; 897 | } 898 | .modal { 899 | top: 10px; 900 | right: 10px; 901 | left: 10px; 902 | } 903 | .modal-header .close { 904 | padding: 10px; 905 | margin: -10px; 906 | } 907 | .carousel-caption { 908 | position: static; 909 | } 910 | } 911 | 912 | @media (max-width: 979px) { 913 | body { 914 | padding-top: 0; 915 | } 916 | .navbar-fixed-top, 917 | .navbar-fixed-bottom { 918 | position: static; 919 | } 920 | .navbar-fixed-top { 921 | margin-bottom: 20px; 922 | } 923 | .navbar-fixed-bottom { 924 | margin-top: 20px; 925 | } 926 | .navbar-fixed-top .navbar-inner, 927 | .navbar-fixed-bottom .navbar-inner { 928 | padding: 5px; 929 | } 930 | .navbar .container { 931 | width: auto; 932 | padding: 0; 933 | } 934 | .navbar .brand { 935 | padding-right: 10px; 936 | padding-left: 10px; 937 | margin: 0 0 0 -5px; 938 | } 939 | .nav-collapse { 940 | clear: both; 941 | } 942 | .nav-collapse .nav { 943 | float: none; 944 | margin: 0 0 10px; 945 | } 946 | .nav-collapse .nav > li { 947 | float: none; 948 | } 949 | .nav-collapse .nav > li > a { 950 | margin-bottom: 2px; 951 | } 952 | .nav-collapse .nav > .divider-vertical { 953 | display: none; 954 | } 955 | .nav-collapse .nav .nav-header { 956 | color: #777777; 957 | text-shadow: none; 958 | } 959 | .nav-collapse .nav > li > a, 960 | .nav-collapse .dropdown-menu a { 961 | padding: 9px 15px; 962 | font-weight: bold; 963 | color: #777777; 964 | -webkit-border-radius: 3px; 965 | -moz-border-radius: 3px; 966 | border-radius: 3px; 967 | } 968 | .nav-collapse .btn { 969 | padding: 4px 10px 4px; 970 | font-weight: normal; 971 | -webkit-border-radius: 4px; 972 | -moz-border-radius: 4px; 973 | border-radius: 4px; 974 | } 975 | .nav-collapse .dropdown-menu li + li a { 976 | margin-bottom: 2px; 977 | } 978 | .nav-collapse .nav > li > a:hover, 979 | .nav-collapse .dropdown-menu a:hover { 980 | background-color: #f2f2f2; 981 | } 982 | .navbar-inverse .nav-collapse .nav > li > a:hover, 983 | .navbar-inverse .nav-collapse .dropdown-menu a:hover { 984 | background-color: #111111; 985 | } 986 | .nav-collapse.in .btn-group { 987 | padding: 0; 988 | margin-top: 5px; 989 | } 990 | .nav-collapse .dropdown-menu { 991 | position: static; 992 | top: auto; 993 | left: auto; 994 | display: block; 995 | float: none; 996 | max-width: none; 997 | padding: 0; 998 | margin: 0 15px; 999 | background-color: transparent; 1000 | border: none; 1001 | -webkit-border-radius: 0; 1002 | -moz-border-radius: 0; 1003 | border-radius: 0; 1004 | -webkit-box-shadow: none; 1005 | -moz-box-shadow: none; 1006 | box-shadow: none; 1007 | } 1008 | .nav-collapse .dropdown-menu:before, 1009 | .nav-collapse .dropdown-menu:after { 1010 | display: none; 1011 | } 1012 | .nav-collapse .dropdown-menu .divider { 1013 | display: none; 1014 | } 1015 | .nav-collapse .nav > li > .dropdown-menu:before, 1016 | .nav-collapse .nav > li > .dropdown-menu:after { 1017 | display: none; 1018 | } 1019 | .nav-collapse .navbar-form, 1020 | .nav-collapse .navbar-search { 1021 | float: none; 1022 | padding: 10px 15px; 1023 | margin: 10px 0; 1024 | border-top: 1px solid #f2f2f2; 1025 | border-bottom: 1px solid #f2f2f2; 1026 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1027 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1028 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1029 | } 1030 | .navbar-inverse .nav-collapse .navbar-form, 1031 | .navbar-inverse .nav-collapse .navbar-search { 1032 | border-top-color: #111111; 1033 | border-bottom-color: #111111; 1034 | } 1035 | .navbar .nav-collapse .nav.pull-right { 1036 | float: none; 1037 | margin-left: 0; 1038 | } 1039 | .nav-collapse, 1040 | .nav-collapse.collapse { 1041 | height: 0; 1042 | overflow: hidden; 1043 | } 1044 | .navbar .btn-navbar { 1045 | display: block; 1046 | } 1047 | .navbar-static .navbar-inner { 1048 | padding-right: 10px; 1049 | padding-left: 10px; 1050 | } 1051 | } 1052 | 1053 | @media (min-width: 980px) { 1054 | .nav-collapse.collapse { 1055 | height: auto !important; 1056 | overflow: visible !important; 1057 | } 1058 | } 1059 | --------------------------------------------------------------------------------