mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1134 CodeMirror's code folding reference: - https://codemirror.net/doc/manual.html#addon_foldcode This commit adds support for code-folding to the filter list editor/viewer. The following blocks of code are foldable by clicking the corresponding marker in the gutter: - !#if/#endif blocks - !#include blocks Addtionally, the following changes: - The `!#include` line is now preserved when importing a sublist - The `!#if` directives will be syntax-colored according to whether they evaluate to true or false on the current platform - Double-clicking on a foldable line in the gutter will select the content of the foldable block - Minor visual improvement to matching brackets
56 lines
2 KiB
HTML
56 lines
2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title data-i18n="assetViewerPageName"></title>
|
|
<link rel="stylesheet" href="lib/codemirror/lib/codemirror.css">
|
|
<link rel="stylesheet" href="lib/codemirror/addon/fold/foldgutter.css">
|
|
<link rel="stylesheet" href="lib/codemirror/addon/search/matchesonscrollbar.css">
|
|
<link rel="stylesheet" type="text/css" href="css/themes/default.css">
|
|
<link rel="stylesheet" href="css/common.css">
|
|
<link rel="stylesheet" href="css/fa-icons.css">
|
|
<link rel="stylesheet" href="css/codemirror.css">
|
|
<link rel="shortcut icon" type="image/png" href="img/icon_32.png"/>
|
|
<style>
|
|
body {
|
|
border: 0;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
}
|
|
#content {
|
|
height: 100vh;
|
|
width: 100vw;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="content" class="codeMirrorContainer codeMirrorBreakAll"></div>
|
|
|
|
<script src="lib/codemirror/lib/codemirror.js"></script>
|
|
<script src="lib/codemirror/addon/display/panel.js"></script>
|
|
<script src="lib/codemirror/addon/edit/matchbrackets.js"></script>
|
|
<script src="lib/codemirror/addon/fold/foldcode.js"></script>
|
|
<script src="lib/codemirror/addon/fold/foldgutter.js"></script>
|
|
<script src="lib/codemirror/addon/scroll/annotatescrollbar.js"></script>
|
|
<script src="lib/codemirror/addon/search/matchesonscrollbar.js"></script>
|
|
<script src="lib/codemirror/addon/search/searchcursor.js"></script>
|
|
<script src="lib/codemirror/addon/selection/active-line.js"></script>
|
|
|
|
<script src="js/codemirror/search.js"></script>
|
|
<script src="js/codemirror/ubo-static-filtering.js"></script>
|
|
|
|
<script src="js/fa-icons.js"></script>
|
|
<script src="js/vapi.js"></script>
|
|
<script src="js/vapi-common.js"></script>
|
|
<script src="js/vapi-client.js"></script>
|
|
<script src="js/udom.js"></script>
|
|
<script src="js/i18n.js"></script>
|
|
<script src="js/dashboard-common.js"></script>
|
|
<script src="js/static-filtering-parser.js"></script>
|
|
<script src="js/asset-viewer.js"></script>
|
|
|
|
</body>
|
|
</html>
|