move phraseapp js into own file
This commit is contained in:
parent
8fc30fbe3a
commit
d9225e65df
3 changed files with 10 additions and 24 deletions
8
public/js/phraseapp.js
Normal file
8
public/js/phraseapp.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
window.PHRASEAPP_CONFIG = {
|
||||||
|
projectId: '94f8b39450cd749ae9c3cc0ab8cdb61d'
|
||||||
|
};
|
||||||
|
(function() {
|
||||||
|
var phraseapp = document.createElement('script'); phraseapp.type = 'text/javascript'; phraseapp.async = true;
|
||||||
|
phraseapp.src = ['https://', 'phraseapp.com/assets/in-context-editor/2.0/app.js?', new Date().getTime()].join('');
|
||||||
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(phraseapp, s);
|
||||||
|
})();
|
|
@ -50,17 +50,6 @@
|
||||||
{!! Theme::js('js/vendor/jquery/jquery.min.js') !!}
|
{!! Theme::js('js/vendor/jquery/jquery.min.js') !!}
|
||||||
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
|
||||||
|
|
||||||
@if(config('app.phrase_in_context'))
|
@if(config('app.phrase_in_context')) {!! Theme::js('js/phraseapp.js') !!} @endif
|
||||||
<script>
|
|
||||||
window.PHRASEAPP_CONFIG = {
|
|
||||||
projectId: '94f8b39450cd749ae9c3cc0ab8cdb61d'
|
|
||||||
};
|
|
||||||
(function() {
|
|
||||||
var phraseapp = document.createElement('script'); phraseapp.type = 'text/javascript'; phraseapp.async = true;
|
|
||||||
phraseapp.src = ['https://', 'phraseapp.com/assets/in-context-editor/2.0/app.js?', new Date().getTime()].join('');
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(phraseapp, s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
@endif
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -282,18 +282,7 @@
|
||||||
{!! Theme::js('js/vendor/socketio/socket.io.min.js') !!}
|
{!! Theme::js('js/vendor/socketio/socket.io.min.js') !!}
|
||||||
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
{!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!}
|
||||||
|
|
||||||
@if(config('app.phrase_in_context'))
|
@if(config('app.phrase_in_context')) {!! Theme::js('js/phraseapp.js') !!} @endif
|
||||||
<script>
|
|
||||||
window.PHRASEAPP_CONFIG = {
|
|
||||||
projectId: '94f8b39450cd749ae9c3cc0ab8cdb61d'
|
|
||||||
};
|
|
||||||
(function() {
|
|
||||||
var phraseapp = document.createElement('script'); phraseapp.type = 'text/javascript'; phraseapp.async = true;
|
|
||||||
phraseapp.src = ['https://', 'phraseapp.com/assets/in-context-editor/2.0/app.js?', new Date().getTime()].join('');
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(phraseapp, s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
@endif
|
|
||||||
@show
|
@show
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue