You can overwrite the way Mashshare is currently creating the Share buttons.
Ate the moment script.php writes all the necessary information for sharing into var mashsb (look at the html source at <CDATA> part within the header)
You can write a new function and just put it in a separate plugin or into functions.php:
function overwriteGetNetworks ( $output) {
if (!empty($enablednetworks)) {
foreach ($enablednetworks as $key => $network):
if($mashsb_options['visible_services'] !== 'all' && $maxcounter != count($enablednetworks) && $mashsb_options['visible_services'] < count($enablednetworks)){
//if ($startcounter > $maxcounter){$hiddenclass = 'mashsb-hide';} else {$hiddenclass = '';}
if ($startcounter === $maxcounter ){
$onoffswitch = onOffSwitch();
//$onoffswitch2 = onOffSwitch2();
$startsecondaryshares = '<div class="secondary-shares" style="display:none;">';} else {$onoffswitch = ''; $onoffswitch2 = ''; $startsecondaryshares = '';}
if ($startcounter === (count($enablednetworks))){
//$onoffswitch2 = onOffSwitch2();
$endsecondaryshares = '</div>'; } else { ;$endsecondaryshares = '';}</p>
//echo " Debug: Startcounter " . $startcounter . " Hello: " . $maxcounter+1 .
//" Debug: Enabled services: " . count($enablednetworks) . "";
}
if ($enablednetworks[$key]['name'] !='') {
/* replace all spaces with $nbsp; prevents css content: error on text-intend */
$name = preg_replace('/40{1,}/','?',$enablednetworks[$key]['name']);
} else {
$name = ucfirst($enablednetworks[$key]['id']);
}</p>
$output .= '<a href="void(0);"><span class="icon"></span><span class="text">' . $name . '</span></a>';
$output .= $onoffswitch;
$output .= $startsecondaryshares;</p>
$startcounter++;
endforeach;
$output .= onOffSwitch2();
$output .= $endsecondaryshares;
}
}
add_filter( 'return_networks', 'overwriteGetNetworks ' );
This is not a ready to use code, you have to do some changes here:
$output .= '<a class="mashicon-' . $enablednetworks[$key]['id'] . '" href="javascript:void(0);"><span class="icon"></span><span class="text">' . $name . '</span></a>';
Build the share links and fill page title and page url into some vars and than create an array which contains the href share links like
$shareurl = array(
'Twitter' => 'https://twitter.com/intent/tweet?text=Mashshare+%E2%80%93+A+Mashable+inspired+share+button%20&via=Mashshare&url=https://www.mashshare.net/',
'Facebook' => 'https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][0]=EXAMPLE'
)
Change the href part to something like:
$output .= '<a class="mashicon-' . $enablednetworks[$key]['id'] . '" href="'.$shareurl[$key]['id'].'"><span class="icon"></span><span class="text">' . $name . '</span></a>';
Hope this brings you on the right track. Its not complicated but is a whole rewrite of the current function. Let me know if you need more help. You can reach me info [at] mashshare.net
Edit: With this approach we use href for building the share links and use js only for generating the popup window.
If you find some time to work on this i can create a git hup repository for Mashshare and will later merge this new function into the Mashare core.