GameArter's Sharing solution

Simple, light & customizable solution for sharing web pages.

Example Installation on website (sharing panel in default customization)

copy
<script>
	function gameArterShare(){
		if(typeof GamearterShareModule === "undefined"){
			var s = document.createElement("script");
			s.src = "https://www.gamearter.com/public-services/sharing/gamearter-sharing.js";
			s.onload = function(){ window.shareModule = new GamearterShareModule(); window.shareModule.open(); };
			(document.head || document.getElementsByTagName("head")[0]).append(s);
		} else {
			window.shareModule.open();
		}
	}
</script>
<button onclick="gameArterShare()"> Try it in the practice - Press me</button>

Configuration options

Variable description default value
colorTheme Color theme of sharing module undefined (=> dark theme)
modules List of sharing options available via the sharing module. Options are displayed in the same order like they are defined in the array. undefined (=> all available)
placeIdElement Element id on the page inside which sharing module is displayed undefined (=> body element)
copy
<script>
	function gameArterShare(){
		if(typeof GamearterShareModule === "undefined"){
			var s = document.createElement("script");
			s.src = "https://www.gamearter.com/public-services/sharing/gamearter-sharing.js";
			s.onload = function(){ window.shareModule = new GamearterShareModule( colorTheme, modules, placeIdElement ); window.shareModule.open(); };
			(document.head || document.getElementsByTagName("head")[0]).append(s);
		} else {
			window.shareModule.open();
		}
	}
</script>
<button onclick="gameArterShare()"> SHARE </button>

Configuration options - sharing customization:

Variable value type Options Description
colorTheme string "dark" Sharing panel in black color theme
"light" Sharing panel in white color theme
modules Array "Copy link" Copy page url to clipboard
"Facebook" Share on Facebook
"Twitter" Share on Twitter
"Gmail" Send via Gmail
"VKontakte" Share on VKontakte
"Pinterest" Share on Pinterest
placeIdElement string - element id inside which gamearter sharing panel will be displayed
Example of implementation with customized options - display sharing panel in light theme, with following sharing options with followed order
copy

<script>
	function gameArterShare(){
		if(typeof GamearterShareModule === "undefined"){
			var s = document.createElement("script");
			s.src = "https://www.gamearter.com/public-services/sharing/gamearter-sharing.js";
			s.onload = function(){ window.shareModule = new GamearterShareModule("light",["Copy link","Facebook","Twitter","VKontakte"]); window.shareModule.open(); };
			(document.head || document.getElementsByTagName("head")[0]).append(s);
		} else {
			window.shareModule.open();
		}
	}
</script>
<button onclick="gameArterShare()"> SHARE </button>
Check Light color theme in practice on Games44 (top right corner)

Facebook, Twitter and other social sites uses Open graph protocol for creating sharing previews. Be sure you have following meta tags in header to reach best possible performance on that social sites

copy
<meta property="og:title" content="Page title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="website url" />
<meta property="og:image" content="image url" />

NOTE: GameArter still actively add other options such as new themeColors and sharing options.