projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
auth_domain guessing with protocol independend links, MKWS-103
[mkws-moved-to-github.git]
/
tools
/
htdocs
/
mkws.js
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
0dc511f
..
7343749
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-1084,7
+1084,7
@@
function mkws_service_proxy_auth(auth_url, auth_domain, pp2_url) {
debug("Run service proxy auth URL: " + auth_url);
if (!auth_domain) {
debug("Run service proxy auth URL: " + auth_url);
if (!auth_domain) {
- auth_domain = pp2_url.replace(/^http:\/\/(.*?)\/.*/, '$1');
+ auth_domain = pp2_url.replace(/^(https?:)?\/\/(.*?)\/.*/, '$2');
debug("guessed auth_domain '" + auth_domain + "' from pp2_url '" + pp2_url + "'");
}
debug("guessed auth_domain '" + auth_domain + "' from pp2_url '" + pp2_url + "'");
}
@@
-1210,9
+1210,16
@@
function M(word) {
* implement jQuery plugin $.pazpar2({})
*/
function _mkws_jquery_plugin ($) {
* implement jQuery plugin $.pazpar2({})
*/
function _mkws_jquery_plugin ($) {
- // delayed debug, internal variables are set after dom ready
+ var debug_level = 1;
+
function debug (string) {
function debug (string) {
- setTimeout(function() { mkws.debug_function(string); }, 500);
+ if (!debug_level)
+ return;
+
+ if (typeof console === "undefined" || typeof console.log === "undefined")
+ return;
+
+ console.log("jquery.pazpar2: " + string);
}
function init_popup(obj) {
}
function init_popup(obj) {