Submit
Path:
~
/
home
/
b
/
f
/
x
/
bfxleof
/
www
/
wp-content
/
plugins
/
social-warfare
/
lib
/
admin
/
assets
/
js
/
File Content:
clickToTweet.min.js
!function(){tinymce.PluginManager.add("click_to_tweet",function(e,t){e.addButton("click_to_tweet",{title:"Click to Tweet by Social Warfare",icon:"sw sw swp_twitter_icon",onclick:function(){e.windowManager.open({title:'Build Your "Click to Tweet"',class:"swp_ctt",body:[{type:"textbox",multiline:!0,style:"height:50px",name:"tweet",label:"The Tweet that will be sent out on Twitter.",onkeyup:function(){var e=jQuery(".mce-first textarea").val(),t=(e.length,jQuery("#social_warfare .twitterIDWrapper label").html());if(e.indexOf("http")>-1||e.indexOf("https")>-1?linkSpace=0:linkSpace=23,void 0===t)var a=280-socialWarfareAdmin.linkLength(e)-linkSpace;else var a=280-socialWarfareAdmin.linkLength(e)-linkSpace-t.length-6;a>1||0==a?jQuery(".tweetCounter").css({color:"green"}).text(a+" characters"):1==a?jQuery(".tweetCounter").css({color:"green"}).text(a+" character"):a<0&&jQuery(".tweetCounter").css({color:"red"}).text(a+" characters")},class:"tweetCounting"},{type:"label",name:"someHelpText",onPostRender:function(){var e=jQuery(".mce-first textarea").val(),t=(e.length,jQuery("#social_warfare .twitterIDWrapper label").html());if(e.indexOf("http")>-1||e.indexOf("https")>-1?linkSpace=0:linkSpace=23,void 0===t)var a=280-socialWarfareAdmin.linkLength(e)-linkSpace;else var a=280-socialWarfareAdmin.linkLength(e)-linkSpace-t.length-6;this.getEl().innerHTML=void 0===t?'<span style="float:right;">Based on a link being added and the current content above, you have <span class="tweetCounter" style="color:green">'+a+" characters</span> remaining.</span>":'<span style="float:right;">Based on your username ('+t+'), a link being added, and the current content above, you have <span class="tweetCounter" style="color:green">'+a+" characters</span> remaining.</span>"},text:""},{type:"textbox",multiline:!0,style:"height:50px",name:"quote",label:"The quote as it will appear in your article."},{type:"label",name:"someHelpText2",onPostRender:function(){this.getEl().innerHTML='<div style="width:650px;"> </div>'},text:""},{type:"listbox",name:"theme",label:"Visual Theme",values:[{text:"Default",value:"default"},{text:"Send Her My Love",value:"style1"},{text:"Roll With The Changes",value:"style2"},{text:"Free Bird",value:"style3"},{text:"Don't Stop Believin'",value:"style4"},{text:"Thunderstruck",value:"style5"},{text:"Livin' On A Prayer",value:"style6"}]}],onsubmit:function(t){var a=jQuery(".mce-first textarea").val(),n=(a.length,jQuery("#social_warfare .twitterIDWrapper label").html());if(a.indexOf("http")>-1||a.indexOf("https")>-1?linkSpace=0:linkSpace=23,void 0===n)var l=280-socialWarfareAdmin.linkLength(a)-linkSpace;else var l=280-socialWarfareAdmin.linkLength(a)-linkSpace-n.length-6;return""===t.data.tweet||""===t.data.quote?(e.windowManager.alert("Please, fill in both fields."),!1):l<0?(e.windowManager.alert("You have too many characters in your tweet."),!1):void("default"==t.data.theme?e.insertContent('[click_to_tweet tweet="'+t.data.tweet.replace(/"/g,"'")+'" quote="'+t.data.quote.replace(/"/g,"'")+'"]'):e.insertContent('[click_to_tweet tweet="'+t.data.tweet.replace(/"/g,"'")+'" quote="'+t.data.quote.replace(/"/g,"'")+'" theme="'+t.data.theme+'"]'))}})}})})}();
Submit
FILE
FOLDER
Name
Size
Permission
Action
clickToTweet.js
5207 bytes
0644
clickToTweet.min.js
3194 bytes
0644
tmclicktotweet_plugin.js
912 bytes
0644
N4ST4R_ID | Naxtarrr