mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 20:44:53 -04:00
Remove unused code.
This commit is contained in:
parent
72d8152df5
commit
a58b78d11a
3 changed files with 0 additions and 60 deletions
|
@ -34,26 +34,6 @@ modulejs.define('core/resource', ['_', '$', 'config', 'core/settings'], function
|
||||||
return fallbackHref + 'file.svg';
|
return fallbackHref + 'file.svg';
|
||||||
};
|
};
|
||||||
|
|
||||||
// loadScript = function (filename, callback) {
|
|
||||||
|
|
||||||
// $.ajax({
|
|
||||||
// url: scriptsHref + filename,
|
|
||||||
// dataType: 'script'
|
|
||||||
// }).done(function () {
|
|
||||||
|
|
||||||
// callback();
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
// loadScriptGlob = function (filename, globalId, callback) {
|
|
||||||
|
|
||||||
// if (win[globalId]) {
|
|
||||||
// callback(win[globalId]);
|
|
||||||
// } else {
|
|
||||||
// loadScript(filename, function () { callback(win[globalId]); });
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
image: image,
|
image: image,
|
||||||
|
|
|
@ -9,43 +9,6 @@ modulejs.define('ext/preview-txt', ['_', '$', 'marked', 'prism', 'core/settings'
|
||||||
templateText = '<pre id="pv-txt-text" class="highlighted"><code/></pre>',
|
templateText = '<pre id="pv-txt-text" class="highlighted"><code/></pre>',
|
||||||
templateMarkdown = '<div id="pv-txt-text" class="markdown"/>',
|
templateMarkdown = '<div id="pv-txt-text" class="markdown"/>',
|
||||||
|
|
||||||
// adapted from SyntaxHighlighter
|
|
||||||
getHighlightedLines = function (sh, alias, content) {
|
|
||||||
|
|
||||||
var brushes = sh.vars.discoveredBrushes,
|
|
||||||
Brush, brush;
|
|
||||||
|
|
||||||
if (!brushes) {
|
|
||||||
brushes = {};
|
|
||||||
|
|
||||||
_.each(sh.brushes, function (info, brush) {
|
|
||||||
|
|
||||||
var aliases = info.aliases;
|
|
||||||
|
|
||||||
if (aliases) {
|
|
||||||
info.brushName = brush.toLowerCase();
|
|
||||||
|
|
||||||
for (var i = 0; i < aliases.length; i += 1) {
|
|
||||||
brushes[aliases[i]] = brush;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
sh.vars.discoveredBrushes = brushes;
|
|
||||||
}
|
|
||||||
|
|
||||||
Brush = sh.brushes[brushes[alias || 'plain']];
|
|
||||||
|
|
||||||
if (!Brush) {
|
|
||||||
return $();
|
|
||||||
}
|
|
||||||
|
|
||||||
brush = new Brush();
|
|
||||||
brush.init({toolbar: false, gutter: false});
|
|
||||||
|
|
||||||
return $(brush.getHtml(content)).find('.line');
|
|
||||||
},
|
|
||||||
|
|
||||||
preloadText = function (absHref, callback) {
|
preloadText = function (absHref, callback) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
// @include "lib/sh/shCore.js"
|
|
||||||
// @include "lib/sh/shBrush*.js"
|
|
Loading…
Add table
Add a link
Reference in a new issue