web/wp-content/plugins/network-publisher/networkpub.js
changeset 204 09a1c134465b
parent 194 32102edaa81b
--- a/web/wp-content/plugins/network-publisher/networkpub.js	Wed Dec 19 12:35:13 2012 -0800
+++ b/web/wp-content/plugins/network-publisher/networkpub.js	Wed Dec 19 17:46:52 2012 -0800
@@ -1,3 +1,4 @@
+var networkpub_lastpos=0;
 jQuery(document).ready(function($){
 	$(".networkpublisherremove").bind("click", function(e) {
 		$("#networkpub_remove").html('<div class="updated fade" style="padding:5px;text-align:center">'+$("#networkpub_text_removing").val()+'.</div>')
@@ -30,4 +31,36 @@
 			parent
 		);
 	});
+	setTimeout(function(){
+		if($("#linksalpha_browser").length>0){
+			if($("#linksalpha_post_extension_chrome").length == 0) {
+				if($("#linksalpha_browser").val() == 'chrome') {
+					$("#linksalpha_post_download_chrome").show();
+				} else if($("#linksalpha_browser").val() == 'firefox') {
+					$("#linksalpha_post_download_firefox").show();
+				} else if($("#linksalpha_browser").val() == 'safari') {
+					$("#linksalpha_post_download_safari").show();
+				}
+			} else {
+				$("#linksalpha_post_download_chrome").remove();
+				$("#linksalpha_post_download_firefox").remove();
+				$("#linksalpha_post_download_safari").remove();
+				$(".networkpublisher_post_meta_box_first").css('border-top-color', 'transparent');
+			}
+		}
+	},3000);
+	if($("#networkpub_post_update").length) {
+		$("#networkpub_post_update").live("click", function() {
+			$("body").append('<div id="networkpub_overlay"><iframe id="linksalpha_post_plugin" src="http://www.linksalpha.com/post2/postpopup?'+$("#networkpub_post_data").val()+'" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="no"></iframe></div>');
+			return false;
+		});
+	}
+	$.receiveMessage(
+		function(e){
+			if(e.data=='["close"]') {
+				$("#networkpub_overlay").remove();
+			}
+		},
+		'http://www.linksalpha.com'
+	);
 });
\ No newline at end of file