Add support for the native web share API in share dialog (#4201)
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / headIncludeJavaScript.tpl
index 64560c01dc550aae1e36e6c0e7dcf785f1373e82..fe9b47518ae4dc970cd0316aeeceb5e02fda99fe 100644 (file)
@@ -147,7 +147,14 @@ window.addEventListener('pageshow', function(event) {
                        'wcf.message.share.permalink.html': '{jslang}wcf.message.share.permalink.html{/jslang}',
                        'wcf.message.share.socialMedia': '{jslang}wcf.message.share.socialMedia{/jslang}',
                        'wcf.message.share.copy': '{jslang}wcf.message.share.copy{/jslang}',
-                       'wcf.message.share.copy.success': '{jslang}wcf.message.share.copy.success{/jslang}'
+                       'wcf.message.share.copy.success': '{jslang}wcf.message.share.copy.success{/jslang}',
+                       'wcf.message.share.nativeShare': '{jslang}wcf.message.share.nativeShare{/jslang}',
+                       'wcf.global.button.rss': '{jslang}wcf.global.button.rss{/jslang}',
+                       'wcf.global.rss.copy': '{jslang}wcf.global.rss.copy{/jslang}',
+                       'wcf.global.rss.copy.success': '{jslang}wcf.global.rss.copy.success{/jslang}',
+                       'wcf.global.rss.accessToken.info': '{jslang}wcf.global.rss.accessToken.info{/jslang}',
+                       'wcf.global.rss.withoutAccessToken': '{jslang}wcf.global.rss.withoutAccessToken{/jslang}',
+                       'wcf.global.rss.withAccessToken': '{jslang}wcf.global.rss.withAccessToken{/jslang}'
                        {if MODULE_LIKE}
                                ,'wcf.like.button.like': '{jslang}wcf.like.button.like{/jslang}',
                                'wcf.like.button.dislike': '{jslang}wcf.like.button.dislike{/jslang}',
@@ -160,6 +167,12 @@ window.addEventListener('pageshow', function(event) {
                        {event name='javascriptLanguageImport'}
                });
                
+               User.init(
+                       {@$__wcf->user->userID},
+                       '{@$__wcf->user->username|encodeJS}',
+                       {if $__wcf->user->userID}'{@$__wcf->user->getLink()|encodeJS}'{else}''{/if}
+               );
+               
                BootstrapFrontend.setup({
                        backgroundQueue: {
                                url: '{link controller="BackgroundQueuePerform"}{/link}',
@@ -172,8 +185,6 @@ window.addEventListener('pageshow', function(event) {
                        {/if}
                        styleChanger: {if $__wcf->getStyleHandler()->showStyleChanger()}true{else}false{/if}
                });
-               
-               User.init({@$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}', {if $__wcf->user->userID}'{@$__wcf->user->getLink()|encodeJS}'{else}''{/if});
        });
        
        // prevent jQuery and other libraries from utilizing define()