Changeset 23812 for main/trunk/greenstone2/macros
- Timestamp:
- 2011-03-24T16:55:01+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/macros/document.dm
r23805 r23812 519 519 520 520 521 522 521 523 package Global 522 524 523 525 # Social network support 524 526 # Defined here in document, as the most likely place this will be used in … … 529 531 # _2_ = [srclink] or left empty. If left empty, then it will share the internal GS document 530 532 531 532 533 _sharemescript_ { 533 534 <script type="text/javascript"> 534 535 535 var a2a_config = a2a_config || \{ \}; 536 536 a2a_config.linkname = "_1_"; 537 _If_(_2_, 537 538 _If_(_2_, 538 539 var srclink = \'_2_\'; 539 var href = srclink.match(/href=\"([^\"]*)\"/); 540 a2a_config.linkurl = gsapi.fullDomainURL(href[1]); 541 , 540 541 //If metadata value is a valid URL that starts with xxx:// 542 // (e.g. any protocol\, http, https\, ftp ...) then that will be the link to share 543 if (srclink.match(/^[^:]+:\\\/\\\//i)) \{ 544 a2a_config.linkurl = srclink; 545 \} 546 else \{ 547 //if metadata value is [srclink] then we have to cut off the 'href' tag label 548 var href = srclink.match(/href=\"([^\"]*)\"/); 549 a2a_config.linkurl = gsapi.fullDomainURL(href[1]); 550 \} 551 , 552 //if no metadata was passed as link\, then the GS version of the document will be used. 542 553 a2a_config.linkurl = gsapi.fullDomainURL("_gwcgi_")+ "?c=_cgiargc_&a=d&d=_cgiargd_"; 543 554 )
Note:
See TracChangeset
for help on using the changeset viewer.