前端代码

This commit is contained in:
ChloeChen0423
2025-05-12 16:42:36 +09:00
commit 7c63f2f07b
4531 changed files with 656010 additions and 0 deletions

View File

@ -0,0 +1,40 @@
var files = [
{
type: "css",
context: "remote-debug",
id: "__browser-sync-pesticide__",
active: false,
file: __dirname + "/css/pesticide.min.css",
title: "CSS Outlining",
served: false,
name: "pesticide",
src: "/browser-sync/pesticide.css",
tagline: "Add simple CSS outlines to all elements. (powered by <span style='text-decoration: line-through'>Pesticide.io</span>)",
hidden: ""
},
{
type: "css",
context: "remote-debug",
id: "__browser-sync-pesticidedepth__",
active: false,
file: __dirname + "/css/pesticide-depth.css",
title: "CSS Depth Outlining",
served: false,
name: "pesticide-depth",
src: "/browser-sync/pesticide-depth.css",
tagline: "Add CSS box-shadows to all elements. (powered by <span style='text-decoration: line-through'>Pesticide.io</span>)",
hidden: ""
},
{
type: "js",
context: "n/a",
id: "__browser-sync-gridoverlay__",
active: false,
file: __dirname + "/overlay-grid/js/grid-overlay.js",
served: false,
name: "overlay-grid-js",
src: "/browser-sync/grid-overlay-js.js"
}
];
module.exports.files = files;

View File

@ -0,0 +1,19 @@
<div bs-panel="switch" ng-class="{'disabled': !ctrl.compression.active}">
<div bs-panel-content>
<div bs-panel-icon="switch">
<div class="switch">
<input id="cmn-form-{{ctrl.compression.name}}"
ng-model="ctrl.compression.active"
ng-change="ctrl.toggleLatency(ctrl.compression)"
class="cmn-toggle cmn-toggle-round"
type="checkbox"
checked="">
<label for="cmn-form-{{ctrl.compression.name}}"></label>
</div>
</div>
<div>
<p bs-Text="lede">{{ctrl.compression.title}}</p>
<p ng-if="ctrl.compression.tagline.length" ng-bind-html="ctrl.compression.tagline"></p>
</div>
</div>
</div>

View File

@ -0,0 +1,33 @@
var Immutable = require("immutable");
module.exports.init = function (ui, bs) {
var optPath = ["remote-debug", "compression"];
ui.setOptionIn(optPath, Immutable.Map({
name: "compression",
title: "Compression",
active: false,
tagline: "Add Gzip Compression to all responses"
}));
var methods = {
toggle: function (value) {
if (value !== true) {
value = false;
}
if (value) {
ui.setOptionIn(optPath.concat("active"), true);
bs.addMiddleware("", require("compression")(), {id: "ui-compression", override: true});
} else {
ui.setOptionIn(optPath.concat("active"), false);
bs.removeMiddleware("ui-compression");
}
},
event: function (event) {
methods[event.event](event.data);
}
};
return methods;
};

View File

@ -0,0 +1,498 @@
/*
pesticide v1.0.0 . @mrmrs . MIT
*/
body {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
article {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
nav {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
aside {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
section {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
header {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
footer {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
h1 {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
h2 {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
h3 {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
h4 {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
h5 {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
h6 {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
main {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
address {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
div {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
p {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
hr {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
pre {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
blockquote {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
ol {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
ul {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
li {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
dl {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
dt {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
dd {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
figure {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
figcaption {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
table {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
caption {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
thead {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
tbody {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
tfoot {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
tr {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
th {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
td {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
col {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
colgroup {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
button {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
datalist {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
fieldset {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
form {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
input {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
keygen {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
label {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
legend {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
meter {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
optgroup {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
option {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
output {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
progress {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
select {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
textarea {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
details {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
summary {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
command {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
menu {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
del {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
ins {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
img {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
iframe {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
embed {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
object {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
param {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
video {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
audio {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
source {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
canvas {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
track {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
map {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
area {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
a {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
em {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
strong {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
i {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
b {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
u {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
s {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
small {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
abbr {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
q {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
cite {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
dfn {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
sub {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
sup {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
time {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
code {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
kbd {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
samp {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
var {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
mark {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
bdi {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
bdo {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
ruby {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
rt {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
rp {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
span {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
br {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}
wbr {
-webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6);
box-shadow: 0 0 1rem rgba(0,0,0,0.6);
background-color: rgba(255,255,255,0.25);
}

View File

@ -0,0 +1,201 @@
/*
pesticide v1.0.0 . @mrmrs . MIT
*/
{
body
outline: 1px solid #2980b9 !important;
article
outline: 1px solid #3498db !important;
nav
outline: 1px solid #0088c3 !important;
aside
outline: 1px solid #33a0ce !important;
section
outline: 1px solid #66b8da !important;
header
outline: 1px solid #99cfe7 !important;
footer
outline: 1px solid #cce7f3 !important;
h1
outline: 1px solid #162544 !important;
h2
outline: 1px solid #314e6e !important;
h3
outline: 1px solid #3e5e85 !important;
h4
outline: 1px solid #449baf !important;
h5
outline: 1px solid #c7d1cb !important;
h6
outline: 1px solid #4371d0 !important;
main
outline: 1px solid #2f4f90 !important;
address
outline: 1px solid #1a2c51 !important;
div
outline: 1px solid #036cdb !important;
outline: 1px solid #ac050b !important;
hr
outline: 1px solid #ff063f !important;
pre
outline: 1px solid #850440 !important;
blockquote
outline: 1px solid #f1b8e7 !important;
ol
outline: 1px solid #ff050c !important;
ul
outline: 1px solid #d90416 !important;
li
outline: 1px solid #d90416 !important;
dl
outline: 1px solid #fd3427 !important;
dt
outline: 1px solid #ff0043 !important;
dd
outline: 1px solid #e80174 !important;
figure
outline: 1px solid #f0b !important;
figcaption
outline: 1px solid #bf0032 !important;
table
outline: 1px solid #0c9 !important;
caption
outline: 1px solid #37ffc4 !important;
thead
outline: 1px solid #98daca !important;
tbody
outline: 1px solid #64a7a0 !important;
tfoot
outline: 1px solid #22746b !important;
tr
outline: 1px solid #86c0b2 !important;
th
outline: 1px solid #a1e7d6 !important;
td
outline: 1px solid #3f5a54 !important;
col
outline: 1px solid #6c9a8f !important;
colgroup
outline: 1px solid #6c9a9d !important;
button
outline: 1px solid #da8301 !important;
datalist
outline: 1px solid #c06000 !important;
fieldset
outline: 1px solid #d95100 !important;
form
outline: 1px solid #d23600 !important;
input
outline: 1px solid #fca600 !important;
keygen
outline: 1px solid #b31e00 !important;
label
outline: 1px solid #ee8900 !important;
legend
outline: 1px solid #de6d00 !important;
meter
outline: 1px solid #e8630c !important;
optgroup
outline: 1px solid #b33600 !important;
option
outline: 1px solid #ff8a00 !important;
output
outline: 1px solid #ff9619 !important;
progress
outline: 1px solid #e57c00 !important;
select
outline: 1px solid #e26e0f !important;
textarea
outline: 1px solid #cc5400 !important;
details
outline: 1px solid #33848f !important;
summary
outline: 1px solid #60a1a6 !important;
command
outline: 1px solid #438da1 !important;
menu
outline: 1px solid #449da6 !important;
del
outline: 1px solid #bf0000 !important;
ins
outline: 1px solid #400000 !important;
img
outline: 1px solid #22746b !important;
iframe
outline: 1px solid #64a7a0 !important;
embed
outline: 1px solid #98daca !important;
object
outline: 1px solid #0c9 !important;
param
outline: 1px solid #37ffc4 !important;
video
outline: 1px solid #6ee866 !important;
audio
outline: 1px solid #027353 !important;
source
outline: 1px solid #012426 !important;
canvas
outline: 1px solid #a2f570 !important;
track
outline: 1px solid #59a600 !important;
map
outline: 1px solid #7be500 !important;
area
outline: 1px solid #305900 !important;
a
outline: 1px solid #ff62ab !important;
em
outline: 1px solid #800b41 !important;
strong
outline: 1px solid #ff1583 !important;
i
outline: 1px solid #803156 !important;
b
outline: 1px solid #cc1169 !important;
u
outline: 1px solid #ff0430 !important;
outline: 1px solid #f805e3 !important;
small
outline: 1px solid #d107b2 !important;
abbr
outline: 1px solid #4a0263 !important;
q
outline: 1px solid #240018 !important;
cite
outline: 1px solid #64003c !important;
dfn
outline: 1px solid #b4005a !important;
sub
outline: 1px solid #dba0c8 !important;
sup
outline: 1px solid #cc0256 !important;
time
outline: 1px solid #d6606d !important;
code
outline: 1px solid #e04251 !important;
kbd
outline: 1px solid #5e001f !important;
samp
outline: 1px solid #9c0033 !important;
var
outline: 1px solid #d90047 !important;
mark
outline: 1px solid #ff0053 !important;
bdi
outline: 1px solid #bf3668 !important;
bdo
outline: 1px solid #6f1400 !important;
ruby
outline: 1px solid #ff7b93 !important;
rt
outline: 1px solid #ff2f54 !important;
rp
outline: 1px solid #803e49 !important;
span
outline: 1px solid #cc2643 !important;
br
outline: 1px solid #db687d !important;
wbr
outline: 1px solid #db175b !important;
}

View File

@ -0,0 +1,395 @@
body {
outline: 1px solid #2980b9 !important
}
article {
outline: 1px solid #3498db !important
}
nav {
outline: 1px solid #0088c3 !important
}
aside {
outline: 1px solid #33a0ce !important
}
section {
outline: 1px solid #66b8da !important
}
header {
outline: 1px solid #99cfe7 !important
}
footer {
outline: 1px solid #cce7f3 !important
}
h1 {
outline: 1px solid #162544 !important
}
h2 {
outline: 1px solid #314e6e !important
}
h3 {
outline: 1px solid #3e5e85 !important
}
h4 {
outline: 1px solid #449baf !important
}
h5 {
outline: 1px solid #c7d1cb !important
}
h6 {
outline: 1px solid #4371d0 !important
}
main {
outline: 1px solid #2f4f90 !important
}
address {
outline: 1px solid #1a2c51 !important
}
div {
outline: 1px solid #036cdb !important
}
p {
outline: 1px solid #ac050b !important
}
hr {
outline: 1px solid #ff063f !important
}
pre {
outline: 1px solid #850440 !important
}
blockquote {
outline: 1px solid #f1b8e7 !important
}
ol {
outline: 1px solid #ff050c !important
}
ul {
outline: 1px solid #d90416 !important
}
li {
outline: 1px solid #d90416 !important
}
dl {
outline: 1px solid #fd3427 !important
}
dt {
outline: 1px solid #ff0043 !important
}
dd {
outline: 1px solid #e80174 !important
}
figure {
outline: 1px solid #f0b !important
}
figcaption {
outline: 1px solid #bf0032 !important
}
table {
outline: 1px solid #0c9 !important
}
caption {
outline: 1px solid #37ffc4 !important
}
thead {
outline: 1px solid #98daca !important
}
tbody {
outline: 1px solid #64a7a0 !important
}
tfoot {
outline: 1px solid #22746b !important
}
tr {
outline: 1px solid #86c0b2 !important
}
th {
outline: 1px solid #a1e7d6 !important
}
td {
outline: 1px solid #3f5a54 !important
}
col {
outline: 1px solid #6c9a8f !important
}
colgroup {
outline: 1px solid #6c9a9d !important
}
button {
outline: 1px solid #da8301 !important
}
datalist {
outline: 1px solid #c06000 !important
}
fieldset {
outline: 1px solid #d95100 !important
}
form {
outline: 1px solid #d23600 !important
}
input {
outline: 1px solid #fca600 !important
}
keygen {
outline: 1px solid #b31e00 !important
}
label {
outline: 1px solid #ee8900 !important
}
legend {
outline: 1px solid #de6d00 !important
}
meter {
outline: 1px solid #e8630c !important
}
optgroup {
outline: 1px solid #b33600 !important
}
option {
outline: 1px solid #ff8a00 !important
}
output {
outline: 1px solid #ff9619 !important
}
progress {
outline: 1px solid #e57c00 !important
}
select {
outline: 1px solid #e26e0f !important
}
textarea {
outline: 1px solid #cc5400 !important
}
details {
outline: 1px solid #33848f !important
}
summary {
outline: 1px solid #60a1a6 !important
}
command {
outline: 1px solid #438da1 !important
}
menu {
outline: 1px solid #449da6 !important
}
del {
outline: 1px solid #bf0000 !important
}
ins {
outline: 1px solid #400000 !important
}
img {
outline: 1px solid #22746b !important
}
iframe {
outline: 1px solid #64a7a0 !important
}
embed {
outline: 1px solid #98daca !important
}
object {
outline: 1px solid #0c9 !important
}
param {
outline: 1px solid #37ffc4 !important
}
video {
outline: 1px solid #6ee866 !important
}
audio {
outline: 1px solid #027353 !important
}
source {
outline: 1px solid #012426 !important
}
canvas {
outline: 1px solid #a2f570 !important
}
track {
outline: 1px solid #59a600 !important
}
map {
outline: 1px solid #7be500 !important
}
area {
outline: 1px solid #305900 !important
}
a {
outline: 1px solid #ff62ab !important
}
em {
outline: 1px solid #800b41 !important
}
strong {
outline: 1px solid #ff1583 !important
}
i {
outline: 1px solid #803156 !important
}
b {
outline: 1px solid #cc1169 !important
}
u {
outline: 1px solid #ff0430 !important
}
s {
outline: 1px solid #f805e3 !important
}
small {
outline: 1px solid #d107b2 !important
}
abbr {
outline: 1px solid #4a0263 !important
}
q {
outline: 1px solid #240018 !important
}
cite {
outline: 1px solid #64003c !important
}
dfn {
outline: 1px solid #b4005a !important
}
sub {
outline: 1px solid #dba0c8 !important
}
sup {
outline: 1px solid #cc0256 !important
}
time {
outline: 1px solid #d6606d !important
}
code {
outline: 1px solid #e04251 !important
}
kbd {
outline: 1px solid #5e001f !important
}
samp {
outline: 1px solid #9c0033 !important
}
var {
outline: 1px solid #d90047 !important
}
mark {
outline: 1px solid #ff0053 !important
}
bdi {
outline: 1px solid #bf3668 !important
}
bdo {
outline: 1px solid #6f1400 !important
}
ruby {
outline: 1px solid #ff7b93 !important
}
rt {
outline: 1px solid #ff2f54 !important
}
rp {
outline: 1px solid #803e49 !important
}
span {
outline: 1px solid #cc2643 !important
}
br {
outline: 1px solid #db687d !important
}
wbr {
outline: 1px solid #db175b !important
}

View File

@ -0,0 +1,43 @@
(function (angular) {
const SECTION_NAME = "remote-debug";
/**
* Display the snippet when in snippet mode
*/
angular
.module("BrowserSync")
.directive("latency", function () {
return {
restrict: "E",
replace: true,
scope: {
"options": "="
},
templateUrl: "latency.html",
controller: ["$scope", "Socket", latencyDirectiveControlller],
controllerAs: "ctrl"
};
});
/**
* @param $scope
* @param Socket
*/
function latencyDirectiveControlller($scope, Socket) {
var ctrl = this;
var ns = SECTION_NAME + ":latency";
ctrl.latency = $scope.options[SECTION_NAME]["latency"];
ctrl.alterLatency = function () {
Socket.emit("ui", {
namespace: ns,
event: "adjust",
data: {
rate: ctrl.latency.rate
}
});
};
}
})(angular);

View File

@ -0,0 +1,12 @@
<div ng-show="ctrl.latency.active" bs-panel-content>
<input type="range"
max="5"
min="0"
step=".50"
id="latency-rate"
ng-change="ctrl.alterLatency()"
ng-model="ctrl.latency.rate"/>
<label for="latency-rate">{{ctrl.latency.rate | number:1}}s</label>
</div>

View File

@ -0,0 +1,44 @@
var Immutable = require("immutable");
module.exports.init = function (ui, bs) {
var timeout = 0;
var optPath = ["remote-debug", "latency"];
ui.setOptionIn(optPath, Immutable.Map({
name: "latency",
title: "Latency",
active: false,
tagline: "Simulate slower connections by throttling the response time of each request.",
rate: 0
}));
var methods = {
toggle: function (value) {
if (value !== true) {
value = false;
}
if (value) {
ui.setOptionIn(optPath.concat("active"), true);
bs.addMiddleware("*", function (req, res, next) {
setTimeout(next, timeout);
}, {id: "cp-latency", override: true});
} else {
ui.setOptionIn(optPath.concat("active"), false);
bs.removeMiddleware("cp-latency");
}
},
adjust: function (data) {
timeout = parseFloat(data.rate) * 1000;
var saved = ui.options.getIn(optPath.concat("rate"));
if (saved !== data.rate) {
ui.setOptionIn(optPath.concat("rate"), timeout/1000);
}
},
event: function (event) {
methods[event.event](event.data);
}
};
return methods;
};

View File

@ -0,0 +1,19 @@
<div bs-panel="switch" ng-class="{'disabled': !ctrl.noCache.active}">
<div bs-panel-content>
<div bs-panel-icon="switch">
<div class="switch">
<input id="cmn-form-{{ctrl.noCache.name}}"
ng-model="ctrl.noCache.active"
ng-change="ctrl.toggleLatency(ctrl.noCache)"
class="cmn-toggle cmn-toggle-round"
type="checkbox"
checked="">
<label for="cmn-form-{{ctrl.noCache.name}}"></label>
</div>
</div>
<div>
<p bs-Text="lede">{{ctrl.noCache.title}}</p>
<p ng-if="ctrl.noCache.tagline.length" ng-bind-html="ctrl.noCache.tagline"></p>
</div>
</div>
</div>

View File

@ -0,0 +1,38 @@
var Immutable = require("immutable");
module.exports.init = function (ui, bs) {
var optPath = ["remote-debug", "no-cache"];
ui.setOptionIn(optPath, Immutable.Map({
name: "no-cache",
title: "No Cache",
active: false,
tagline: "Disable all Browser Caching"
}));
var methods = {
toggle: function (value) {
if (value !== true) {
value = false;
}
if (value) {
ui.setOptionIn(optPath.concat("active"), true);
bs.addMiddleware("*", function (req, res, next) {
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
res.setHeader("Pragma", "no-cache");
res.setHeader("Expires", "0");
next();
}, {id: "ui-no-cache", override: true});
} else {
ui.setOptionIn(optPath.concat("active"), false);
bs.removeMiddleware("ui-no-cache");
}
},
event: function (event) {
methods[event.event](event.data);
}
};
return methods;
};

View File

@ -0,0 +1,16 @@
{{selector}}:after {
position: absolute;
width: auto;
height: auto;
z-index: 9999;
content: '';
display: block;
pointer-events: none;
top: {{offsetY}};
right: 0;
bottom: 0;
left: {{offsetX}};
background-color: transparent;
background-image: linear-gradient({{color}} 1px, transparent 1px);
background-size: 100% {{size}};
}

View File

@ -0,0 +1,16 @@
{{selector}}:before {
position: absolute;
width: auto;
height: auto;
z-index: 9999;
content: '';
display: block;
pointer-events: none;
top: {{offsetY}};
right: 0;
bottom: 0;
left: {{offsetX}};
background-color: transparent;
background-image: linear-gradient(90deg, {{color}} 1px, transparent 1px);
background-size: {{size}} 100%;
}

View File

@ -0,0 +1,18 @@
(function (window, bs, undefined) {
var styleElem = bs.addDomNode({
placement: "head",
attrs: {
"type": "text/css",
id: "__bs_overlay-grid-styles__"
},
tagName: "style"
});
bs.socket.on("ui:remote-debug:css-overlay-grid", function (data) {
styleElem.innerHTML = data.innerHTML;
});
bs.socket.emit("ui:remote-debug:css-overlay-grid:ready");
}(window, window.___browserSync___));

View File

@ -0,0 +1,56 @@
(function (angular) {
const SECTION_NAME = "remote-debug";
/**
* Display the snippet when in snippet mode
*/
angular
.module("BrowserSync")
.directive("cssGrid", function () {
return {
restrict: "E",
replace: true,
scope: {
"options": "="
},
templateUrl: "overlay-grid.html",
controller: ["$scope", "Socket", overlayGridDirectiveControlller],
controllerAs: "ctrl"
};
});
/**
* @param $scope
* @param Socket
*/
function overlayGridDirectiveControlller($scope, Socket) {
var ctrl = this;
ctrl.overlayGrid = $scope.options[SECTION_NAME]["overlay-grid"];
ctrl.size = ctrl.overlayGrid.size;
var ns = SECTION_NAME + ":overlay-grid";
ctrl.alter = function (value) {
Socket.emit("ui", {
namespace: ns,
event: "adjust",
data: value
});
};
ctrl.toggleAxis = function (axis, value) {
Socket.emit("ui", {
namespace: ns,
event: "toggle:axis",
data: {
axis: axis,
value: value
}
});
};
}
})(angular);

View File

@ -0,0 +1,106 @@
<div ng-show="ctrl.overlayGrid.active" bs-panel-content>
<div bs-inputs bs-grid="wide-4 desk-2">
<div bs-grid-item>
<div bs-input="text">
<label for="grid-size" bs-input-label>Grid Size</label>
<div bs-input>
<input type="text"
max="100"
min="0"
step="1"
id="grid-size"
size="20"
ng-change="ctrl.alter(ctrl.overlayGrid)"
ng-model="ctrl.overlayGrid.size"/>
</div>
</div>
</div>
<div bs-grid-item>
<div bs-input="text">
<label for="grid-color" bs-input-label>Grid Colour</label>
<div bs-input>
<input type="text"
max="100"
min="0"
step="1"
id="grid-color"
size="20"
ng-change="ctrl.alter(ctrl.overlayGrid)"
ng-model="ctrl.overlayGrid.color"/>
</div>
</div>
</div>
<div bs-grid-item>
<div bs-input="text">
<label for="grid-selector" bs-input-label>CSS Selector</label>
<div bs-input>
<input type="text"
max="100"
min="0"
step="1"
id="grid-selector"
size="20"
ng-change="ctrl.alter(ctrl.overlayGrid)"
ng-model="ctrl.overlayGrid.selector"/>
</div>
</div>
</div>
</div>
<div bs-inputs bs-grid="wide-4 desk-2">
<div bs-grid-item>
<div bs-input="text">
<label for="grid-offsetY" bs-input-label>Offset Top</label>
<div bs-input>
<input type="text"
id="grid-offsetY"
size="20"
ng-change="ctrl.alter(ctrl.overlayGrid)"
ng-model="ctrl.overlayGrid.offsetY"/>
</div>
</div>
</div>
<div bs-grid-item>
<div bs-input="text">
<label for="grid-offsetX" bs-input-label>Offset Left</label>
<div bs-input>
<input type="text"
id="grid-offsetX"
size="20"
ng-change="ctrl.alter(ctrl.overlayGrid)"
ng-model="ctrl.overlayGrid.offsetX"/>
</div>
</div>
</div>
</div>
<div bs-inputs bs-grid="wide-4 desk-2">
<div bs-grid-item>
<div bs-input="inline">
<input
type="checkbox"
id="grid-axis-y"
ng-model="ctrl.overlayGrid.vertical"
ng-change="ctrl.toggleAxis('vertical', ctrl.overlayGrid.vertical)"/>
<label for="grid-axis-y" bs-input-label>Vertical Axis</label>
</div>
</div>
<div bs-grid-item>
<div bs-input="inline">
<input
type="checkbox"
id="grid-axis-x"
ng-model="ctrl.overlayGrid.horizontal"
ng-change="ctrl.toggleAxis('horizontal', ctrl.overlayGrid.horizontal)"/>
<label for="grid-axis-x" bs-input-label>Horizontal Axis</label>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,101 @@
var Immutable = require("immutable");
var fs = require("fs");
var path = require("path");
var baseHorizontal = fs.readFileSync(path.resolve(__dirname, "css/grid-overlay-horizontal.css"), "utf8");
var baseVertical = fs.readFileSync(path.resolve(__dirname, "css/grid-overlay-vertical.css"), "utf8");
function template (string, obj) {
obj = obj || {};
return string.replace(/\{\{(.+?)\}\}/g, function () {
if (obj[arguments[1]]) {
return obj[arguments[1]];
}
return "";
});
}
function getCss(opts) {
var base = opts.selector + " {position:relative;}";
if (opts.horizontal) {
base += baseHorizontal;
}
if (opts.vertical) {
base += baseVertical;
}
return template(base, opts);
}
module.exports.init = function (ui) {
const TRANSMIT_EVENT = "ui:remote-debug:css-overlay-grid";
const READY_EVENT = "ui:remote-debug:css-overlay-grid:ready";
const OPT_PATH = ["remote-debug", "overlay-grid"];
var defaults = {
offsetY: "0",
offsetX: "0",
size: "16px",
selector: "body",
color: "rgba(0, 0, 0, .2)",
horizontal: true,
vertical: true
};
ui.clients.on("connection", function (client) {
client.on(READY_EVENT, function () {
client.emit(TRANSMIT_EVENT, {
innerHTML: getCss(ui.options.getIn(OPT_PATH).toJS())
});
});
});
ui.setOptionIn(OPT_PATH, Immutable.Map({
name: "overlay-grid",
title: "Overlay CSS Grid",
active: false,
tagline: "Add an adjustable CSS overlay grid to your webpage",
innerHTML: ""
}).merge(defaults));
var methods = {
toggle: function (value) {
if (value !== true) {
value = false;
}
if (value) {
ui.setOptionIn(OPT_PATH.concat("active"), true);
ui.enableElement({name: "overlay-grid-js"});
} else {
ui.setOptionIn(OPT_PATH.concat("active"), false);
ui.disableElement({name: "overlay-grid-js"});
ui.clients.emit("ui:element:remove", {id: "__bs_overlay-grid-styles__"});
}
},
adjust: function (data) {
ui.setOptionIn(OPT_PATH, ui.getOptionIn(OPT_PATH).merge(data));
ui.clients.emit(TRANSMIT_EVENT, {
innerHTML: getCss(ui.options.getIn(OPT_PATH).toJS())
});
},
"toggle:axis": function (item) {
ui.setOptionIn(OPT_PATH.concat([item.axis]), item.value);
ui.clients.emit(TRANSMIT_EVENT, {
innerHTML: getCss(ui.options.getIn(OPT_PATH).toJS())
});
},
event: function (event) {
methods[event.event](event.data);
}
};
return methods;
};

View File

@ -0,0 +1,144 @@
(function (angular) {
const SECTION_NAME = "remote-debug";
angular
.module("BrowserSync")
.controller("RemoteDebugController", [
"options",
"Socket",
"pagesConfig",
RemoteDebugController
]);
/**
* @param options
* @param Socket
* @param pagesConfig
*/
function RemoteDebugController(options, Socket, pagesConfig) {
var ctrl = this;
ctrl.options = options.bs;
ctrl.uiOptions = options.ui;
ctrl.clientFiles = options.ui.clientFiles || {};
ctrl.section = pagesConfig[SECTION_NAME];
ctrl.overlayGrid = options.ui[SECTION_NAME]["overlay-grid"];
ctrl.items = [];
if (Object.keys(ctrl.clientFiles).length) {
Object.keys(ctrl.clientFiles).forEach(function (key) {
if (ctrl.clientFiles[key].context === SECTION_NAME) {
ctrl.items.push(ctrl.clientFiles[key]);
}
});
}
ctrl.toggleClientFile = function (item) {
if (item.active) {
return ctrl.enable(item);
}
return ctrl.disable(item);
};
ctrl.toggleOverlayGrid = function (item) {
var ns = SECTION_NAME + ":overlay-grid";
Socket.uiEvent({
namespace: ns,
event: "toggle",
data: item.active
});
};
ctrl.enable = function (item) {
Socket.uiEvent({
namespace: SECTION_NAME + ":files",
event: "enableFile",
data: item
});
};
ctrl.disable = function (item) {
Socket.uiEvent({
namespace: SECTION_NAME + ":files",
event: "disableFile",
data: item
});
};
}
/**
* Display the snippet when in snippet mode
*/
angular
.module("BrowserSync")
.directive("noCache", function () {
return {
restrict: "E",
replace: true,
scope: {
"options": "="
},
templateUrl: "no-cache.html",
controller: ["$scope", "Socket", noCacheDirectiveControlller],
controllerAs: "ctrl"
};
});
/**
* @param $scope
* @param Socket
*/
function noCacheDirectiveControlller ($scope, Socket) {
var ctrl = this;
ctrl.noCache = $scope.options[SECTION_NAME]["no-cache"];
ctrl.toggleLatency = function (item) {
Socket.emit("ui:no-cache", {
event: "toggle",
data: item.active
});
};
}
/**
* Display the snippet when in snippet mode
*/
angular
.module("BrowserSync")
.directive("compression", function () {
return {
restrict: "E",
replace: true,
scope: {
"options": "="
},
templateUrl: "compression.html",
controller: ["$scope", "Socket", compressionDirectiveControlller],
controllerAs: "ctrl"
};
});
/**
* @param $scope
* @param Socket
*/
function compressionDirectiveControlller ($scope, Socket) {
var ctrl = this;
ctrl.compression = $scope.options[SECTION_NAME]["compression"];
ctrl.toggleLatency = function (item) {
Socket.emit("ui:compression", {
event: "toggle",
data: item.active
});
};
}
})(angular);

View File

@ -0,0 +1,23 @@
<div bs-panel="controls outline">
<h1 bs-heading>
<icon icon="{{ctrl.section.icon}}"></icon>
{{ctrl.section.title}}
</h1>
</div>
<switch toggle="ctrl.toggleClientFile(item)"
switchid="plugins-{{$index}}"
active="item.active"
prop="active"
ng-repeat="item in ctrl.items track by $index"
item="item">
<div bs-panel-content ng-if="item.active && item.hidden.length" ng-bind-html="item.hidden"></div>
</switch>
<switch toggle="ctrl.toggleOverlayGrid(ctrl.overlayGrid)"
switchid="css-overlay-grid"
active="ctrl.overlayGrid.active"
prop="active"
item="ctrl.overlayGrid">
<css-grid options="ctrl.uiOptions" ng-if="ctrl.options.mode !== 'snippet'"></css-grid>
</switch>

View File

@ -0,0 +1,82 @@
//var compression = require("./compression");
//var noCachePlugin = require("./no-cache");
var overlayPlugin = require("./overlay-grid/overlay-grid");
var clientFiles = require("./client-files");
const PLUGIN_NAME = "Remote Debug";
/**
* @type {{plugin: Function, plugin:name: string, markup: string}}
*/
module.exports = {
/**
* @param ui
* @param bs
*/
"plugin": function (ui, bs) {
ui.overlayGrid = overlayPlugin.init(ui, bs);
//ui.noCache = noCachePlugin.init(ui, bs);
//ui.compression = compression.init(ui, bs);
/**
* Listen for file events
*/
ui.listen("remote-debug:files", {
"enableFile": function (file) {
ui.enableElement(file);
},
"disableFile": function (file) {
ui.disableElement(file);
}
});
/**
* Listen for overlay-grid events
*/
ui.listen("remote-debug:overlay-grid", ui.overlayGrid);
},
/**
* Hooks
*/
"hooks": {
"markup": fileContent("remote-debug.html"),
"client:js": [
fileContent("/remote-debug.client.js"),
fileContent("/overlay-grid/overlay-grid.client.js")
],
"templates": [
getPath("/overlay-grid/overlay-grid.html")
],
"page": {
path: "/remote-debug",
title: PLUGIN_NAME,
template: "remote-debug.html",
controller: PLUGIN_NAME.replace(" ", "") + "Controller",
order: 4,
icon: "bug"
},
elements: clientFiles.files
},
/**
* Plugin name
*/
"plugin:name": PLUGIN_NAME
};
/**
* @param filepath
* @returns {*}
*/
function getPath (filepath) {
return require("path").join(__dirname, filepath);
}
/**
* @param filepath
* @returns {*}
*/
function fileContent (filepath) {
return require("fs").readFileSync(getPath(filepath), "utf-8");
}