},
"\/ng\/js\/gogs.js": {
"fileType": 64,
- "ignore": 0,
- "ignoreWasSetByUser": 0,
+ "ignore": 1,
+ "ignoreWasSetByUser": 1,
"inputAbbreviatedPath": "\/ng\/js\/gogs.js",
"outputAbbreviatedPath": "\/ng\/js\/min\/gogs-min.js",
"outputPathIsOutsideProject": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
- "\/ng\/js\/min\/gogs-min.js": {
- "fileType": 64,
- "ignore": 1,
- "ignoreWasSetByUser": 0,
- "inputAbbreviatedPath": "\/ng\/js\/min\/gogs-min.js",
- "outputAbbreviatedPath": "\/ng\/js\/min\/min\/gogs-min-min.js",
- "outputPathIsOutsideProject": 0,
- "outputPathIsSetByUser": 0,
- "outputStyle": 1,
- "syntaxCheckerStyle": 1
- },
"\/ng\/js\/utils\/preview.js": {
"fileType": 64,
"ignore": 1,
'use strict';
var csrf;
+var suburl;
function initCommentPreviewTab($form) {
var $tab_menu = $form.find('.tabular.menu');
$(document).ready(function () {
csrf = $('meta[name=_csrf]').attr("content");
+ suburl = $('meta[name=_suburl]').attr("content");
// Show exact time
$('.time-since').each(function () {
// Emojify
emojify.setConfig({
- img_dir:'/img/emoji'
+ img_dir: suburl + '/img/emoji'
});
- $('.markdown').each(function(){
+ $('.emojify').each(function () {
emojify.run($(this)[0]);
});
homepage();
emojify.setConfig({
- img_dir:'/img/emoji'
+ img_dir: Gogs.AppSubUrl + '/img/emoji'
});
emojify.run();
<meta name="keywords" content="go, git, self-hosted, gogs">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="{{.CsrfToken}}" />
+ <meta name="_suburl" content="{{AppSubUrl}}" />
{{if .GoGetImport}}
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
{{end}}
</div>
</div>
<div class="ui attached segment">
- <div class="render-content markdown">
+ <div class="render-content markdown emojify">
{{if .Issue.RenderedContent}}
{{.Issue.RenderedContent|Str2html}}
{{else}}
</div>
</div>
<div class="ui attached segment">
- <div class="render-content markdown">
+ <div class="render-content markdown emojify">
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
<div class="ui bottom attached active write tab segment">
<textarea id="content" name="content"></textarea>
</div>
- <div class="ui bottom attached tab preview segment markdown">
+ <div class="ui bottom attached tab preview segment markdown emojify">
{{$.i18n.Tr "repo.release.loading"}}
</div>
<div class="text right edit buttons">