SVN: toys/rsget.pl/rsget.pl.user.js

sparky sparky at pld-linux.org
Mon Sep 21 16:04:36 CEST 2009


Author: sparky
Date: Mon Sep 21 16:04:36 2009
New Revision: 10626

Modified:
   toys/rsget.pl/rsget.pl.user.js
Log:
- ask about rsget.pl location


Modified: toys/rsget.pl/rsget.pl.user.js
==============================================================================
--- toys/rsget.pl/rsget.pl.user.js	(original)
+++ toys/rsget.pl/rsget.pl.user.js	Mon Sep 21 16:04:36 2009
@@ -1,8 +1,10 @@
 // ==UserScript==
 // @name		rsget.pl helper
-// @namespace	http://rsget.pl/
+// @namespace	http://rsget.pl
 // @description	quickly add links to rsget.pl
-// @include		http://*.*/*
+// @include		http://*/*
+// @include		https://*/*
+// @include		file://*
 // ==/UserScript==
 
 (function(){
@@ -93,10 +95,14 @@
 	}
 	GM_registerMenuCommand("Add links to rsget.pl", extract_links, null, null, "r");
 
+	var server = GM_getValue( "server" );
+	if ( server == null ) {
+		server = prompt( "Specify rsget.pl location", "http://localhost:5666/" );
+		GM_setValue( "server", server );
+	}
+
 	function send( text )
 	{
-		var server = GM_getValue( "server", "http://localhost:5666/" );
-		GM_setValue( "server", server );
 		var uri = server + "add";
 
 		var form = document.createElement( 'form' );


More information about the pld-cvs-commit mailing list