/* * Exception Beautifier plugin - Links extension */ +function ($) { "use strict"; var ExceptionBeautifier = $.fn.exceptionBeautifier.Constructor ExceptionBeautifier.EDITORS = { vscode: {scheme: 'vscode://file/%file:%line', name: 'VS Code (vscode://)'}, phpstorm: {scheme: 'phpstorm://open?file=%file&line=%line', name: 'PhpStorm (phpstorm://)'}, subl: {scheme: 'subl://open?url=file://%file&line=%line', name: 'Sublime (subl://)'}, txmt: {scheme: 'txmt://open/?url=file://%file&line=%line', name: 'TextMate (txmt://)'}, mvim: {scheme: 'mvim://open/?url=file://%file&line=%line', name: 'MacVim (mvim://)'}, editor: {scheme: 'editor://open/?file=%file&line=%line', name: 'Custom (editor://)'} } ExceptionBeautifier.REGEX.editor = /idelink:\/\/([^#]+)&([0-9]+)?/ ExceptionBeautifier.LINKER_POPUP_CONTENT = null ExceptionBeautifier.extensions.push({ onInit: function (exceptionBeautfier) { exceptionBeautfier.initEditorPopup() }, onParse: function (exceptionBeautfier) { exceptionBeautfier.$el.on('click', 'a[data-href]', function () { exceptionBeautfier.openWithEditor($(this).data('href')) }) } }) ExceptionBeautifier.prototype.initEditorPopup = function () { if (!ExceptionBeautifier.LINKER_POPUP_CONTENT) { var title = $.wn.lang.get('eventlog.editor.title'), description = $.wn.lang.get('eventlog.editor.description'), openWith = $.wn.lang.get('eventlog.editor.openWith'), rememberChoice = $.wn.lang.get('eventlog.editor.remember_choice'), open = $.wn.lang.get('eventlog.editor.open'), cancel = $.wn.lang.get('eventlog.editor.cancel'), popup = $(' \
' + description + '
\