var u = require('./util') var forms = exports forms.post = function (req, repo, placeholder, rows) { return '' + '' + '' + '' + '
' + '' + '
' + '
' + '' } forms.name = function (req, enabled, id, name, action, inputId, title, header) { if (!inputId) inputId = action return '
' + (enabled ? '' + '' + '' + '' + ' ' + '' + header : header + '
' ) + '
' } var issueCommentScript = '(' + function () { var $ = document.getElementById.bind(document) $('tab-links').style.display = 'block' $('preview-tab-link').onclick = function (e) { with (new XMLHttpRequest()) { open('POST', '', true) onload = function() { $('preview-tab').innerHTML = responseText } send('action=markdown' + '&repo=' + encodeURIComponent($('repo-id').value) + '&text=' + encodeURIComponent($('post-text').value)) } } }.toString() + ')()' forms.issueComment = function (req, issue, repo, branch, isAuthor, type) { return '
' + '' + '' + '' + '' + '' + forms.post(req, repo) + '' + (isAuthor ? '' : '') + '
' }