Socket
Socket
Sign inDemoInstall

nodebb-theme-oxide

Package Overview
Dependencies
2
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.47 to 6.0.0

templates/partials/chats/system-message.tpl

2

lib/admin.js
"use strict";
define("admin/plugins/oxide", ["settings"], (settings) => {
let ACP = {};
const ACP = {};

@@ -6,0 +6,0 @@ ACP.init = () => {

/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */
; (function (root, factory) {
"use strict";
if (typeof exports === 'object') {
module.exports = factory();
} else {
root.NProgress = factory();
}
(function (root, factory) {
if (typeof exports === "object") {
module.exports = factory();
} else {
root.NProgress = factory();
}
})(this, function () {
var NProgress = {};
var NProgress = {};
NProgress.version = '0.2.0';
NProgress.version = "0.2.0";
NProgress.settings = {
minimum: 0.08,
easing: "ease",
positionUsing: "",
speed: 200,
trickle: true,
trickleSpeed: 200,
showSpinner: false,
barSelector: '[role="bar"]',
spinnerSelector: null,
parent: "body",
template: '<div class="bar" role="bar"><div class="peg"></div></div>',
};
var Settings = NProgress.settings = {
minimum: 0.08,
easing: 'ease',
positionUsing: '',
speed: 200,
trickle: true,
trickleSpeed: 200,
showSpinner: true,
barSelector: '[role="bar"]',
spinnerSelector: '[role="spinner"]',
parent: 'body',
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
};
var Settings = NProgress.settings;
/**
* Updates configuration.
*
* NProgress.configure({
* minimum: 0.1
* });
*/
NProgress.configure = function (options) {
var key, value;
for (key in options) {
value = options[key];
if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
}
/**
* Updates configuration.
*
* NProgress.configure({
* minimum: 0.1
* });
*/
NProgress.configure = function (options) {
var key;
var value;
for (key in options) {
value = options[key];
if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
}
return this;
};
return this;
};
/**
* Last number.
*/
/**
* Last number.
*/
NProgress.status = null;
NProgress.status = null;
/**
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
*
* NProgress.set(0.4);
* NProgress.set(1.0);
*/
/**
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
*
* NProgress.set(0.4);
* NProgress.set(1.0);
*/
NProgress.set = function (n) {
var started = NProgress.isStarted();
NProgress.set = function (n) {
var started = NProgress.isStarted();
n = clamp(n, Settings.minimum, 1);
NProgress.status = (n === 1 ? null : n);
n = clamp(n, Settings.minimum, 1);
NProgress.status = n === 1 ? null : n;
var progress = NProgress.render(!started),
bar = progress.querySelector(Settings.barSelector),
speed = Settings.speed,
ease = Settings.easing;
var progress = NProgress.render(!started);
var bar = progress.querySelector(Settings.barSelector);
var speed = Settings.speed;
var ease = Settings.easing;
progress.offsetWidth; /* Repaint */
progress.offsetWidth; /* Repaint */
queue(function (next) {
// Set positionUsing if it hasn't already been set
if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
queue(function (next) {
// Set positionUsing if it hasn't already been set
if (Settings.positionUsing === "") Settings.positionUsing = NProgress.getPositioningCSS();
// Add transition
css(bar, barPositionCSS(n, speed, ease));
// Add transition
css(bar, barPositionCSS(n, speed, ease));
if (n === 1) {
// Fade out
css(progress, {
transition: 'none',
opacity: 1
});
progress.offsetWidth; /* Repaint */
if (n === 1) {
// Fade out
css(progress, {
transition: "none",
opacity: 1,
});
progress.offsetWidth; /* Repaint */
setTimeout(function () {
css(progress, {
transition: 'all ' + speed + 'ms linear',
opacity: 0
});
setTimeout(function () {
NProgress.remove();
next();
}, speed);
}, speed);
} else {
setTimeout(next, speed);
}
});
setTimeout(function () {
css(progress, {
transition: "all " + speed + "ms linear",
opacity: 0,
});
setTimeout(function () {
NProgress.remove();
next();
}, speed);
}, speed);
} else {
setTimeout(next, speed);
}
});
return this;
};
return this;
};
NProgress.isStarted = function () {
return typeof NProgress.status === 'number';
};
NProgress.isStarted = function () {
return typeof NProgress.status === "number";
};
/**
* Shows the progress bar.
* This is the same as setting the status to 0%, except that it doesn't go backwards.
*
* NProgress.start();
*
*/
NProgress.start = function () {
if (!NProgress.status) NProgress.set(0);
/**
* Shows the progress bar.
* This is the same as setting the status to 0%, except that it doesn't go backwards.
*
* NProgress.start();
*
*/
NProgress.start = function () {
if (!NProgress.status) NProgress.set(0);
var work = function () {
setTimeout(function () {
if (!NProgress.status) return;
NProgress.trickle();
work();
}, Settings.trickleSpeed);
};
var work = function () {
setTimeout(function () {
if (!NProgress.status) return;
NProgress.trickle();
work();
}, Settings.trickleSpeed);
};
if (Settings.trickle) work();
if (Settings.trickle) work();
return this;
};
return this;
};
/**
* Hides the progress bar.
* This is the *sort of* the same as setting the status to 100%, with the
* difference being `done()` makes some placebo effect of some realistic motion.
*
* NProgress.done();
*
* If `true` is passed, it will show the progress bar even if its hidden.
*
* NProgress.done(true);
*/
/**
* Hides the progress bar.
* This is the *sort of* the same as setting the status to 100%, with the
* difference being `done()` makes some placebo effect of some realistic motion.
*
* NProgress.done();
*
* If `true` is passed, it will show the progress bar even if its hidden.
*
* NProgress.done(true);
*/
NProgress.done = function (force) {
if (!force && !NProgress.status) return this;
NProgress.done = function (force) {
if (!force && !NProgress.status) return this;
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
};
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
};
/**
* Increments by a random amount.
*/
/**
* Increments by a random amount.
*/
NProgress.inc = function (amount) {
var n = NProgress.status;
NProgress.inc = function (amount) {
var n = NProgress.status;
if (!n) {
return NProgress.start();
} else if (n > 1) {
return;
} else {
if (typeof amount !== 'number') {
if (n >= 0 && n < 0.2) { amount = 0.1; }
else if (n >= 0.2 && n < 0.5) { amount = 0.04; }
else if (n >= 0.5 && n < 0.8) { amount = 0.02; }
else if (n >= 0.8 && n < 0.99) { amount = 0.005; }
else { amount = 0; }
}
if (!n) {
return NProgress.start();
} else if (n > 1) {
} else {
if (typeof amount !== "number") {
if (n >= 0 && n < 0.2) {
amount = 0.1;
} else if (n >= 0.2 && n < 0.5) {
amount = 0.04;
} else if (n >= 0.5 && n < 0.8) {
amount = 0.02;
} else if (n >= 0.8 && n < 0.99) {
amount = 0.005;
} else {
amount = 0;
}
}
n = clamp(n + amount, 0, 0.994);
return NProgress.set(n);
}
};
n = clamp(n + amount, 0, 0.994);
return NProgress.set(n);
}
};
NProgress.trickle = function () {
return NProgress.inc();
};
NProgress.trickle = function () {
return NProgress.inc();
};
/**
* Waits for all supplied jQuery promises and
* increases the progress as the promises resolve.
*
* @param $promise jQUery Promise
*/
(function () {
var initial = 0, current = 0;
/**
* Waits for all supplied jQuery promises and
* increases the progress as the promises resolve.
*
* @param $promise jQUery Promise
*/
(function () {
var initial = 0;
var current = 0;
NProgress.promise = function ($promise) {
if (!$promise || $promise.state() === "resolved") {
return this;
}
NProgress.promise = function ($promise) {
if (!$promise || $promise.state() === "resolved") {
return this;
}
if (current === 0) {
NProgress.start();
}
if (current === 0) {
NProgress.start();
}
initial++;
current++;
initial++;
current++;
$promise.always(function () {
current--;
if (current === 0) {
initial = 0;
NProgress.done();
} else {
NProgress.set((initial - current) / initial);
}
});
$promise.always(function () {
current--;
if (current === 0) {
initial = 0;
NProgress.done();
} else {
NProgress.set((initial - current) / initial);
}
});
return this;
};
return this;
};
})();
})();
/**
* (Internal) renders the progress bar markup based on the `template`
* setting.
*/
/**
* (Internal) renders the progress bar markup based on the `template`
* setting.
*/
NProgress.render = function (fromStart) {
if (NProgress.isRendered()) return document.getElementById("nprogress");
NProgress.render = function (fromStart) {
if (NProgress.isRendered()) return document.getElementById('nprogress');
addClass(document.documentElement, "nprogress-busy");
addClass(document.documentElement, 'nprogress-busy');
var progress = document.createElement("div");
progress.id = "nprogress";
progress.innerHTML = Settings.template;
var progress = document.createElement('div');
progress.id = 'nprogress';
progress.innerHTML = Settings.template;
var bar = progress.querySelector(Settings.barSelector);
var perc = fromStart ? "-100" : toBarPerc(NProgress.status || 0);
var parent = document.querySelector(Settings.parent);
var spinner;
var bar = progress.querySelector(Settings.barSelector),
perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
parent = document.querySelector(Settings.parent),
spinner;
css(bar, {
transition: "all 0 linear",
transform: "translate3d(" + perc + "%,0,0)",
});
css(bar, {
transition: 'all 0 linear',
transform: 'translate3d(' + perc + '%,0,0)'
});
if (!Settings.showSpinner) {
spinner = progress.querySelector(Settings.spinnerSelector);
spinner && removeElement(spinner);
}
if (!Settings.showSpinner) {
spinner = progress.querySelector(Settings.spinnerSelector);
spinner && removeElement(spinner);
}
if (parent != document.body) {
addClass(parent, "nprogress-custom-parent");
}
if (parent != document.body) {
addClass(parent, 'nprogress-custom-parent');
}
parent.appendChild(progress);
return progress;
};
parent.appendChild(progress);
return progress;
};
/**
* Removes the element. Opposite of render().
*/
/**
* Removes the element. Opposite of render().
*/
NProgress.remove = function () {
removeClass(document.documentElement, "nprogress-busy");
removeClass(document.querySelector(Settings.parent), "nprogress-custom-parent");
var progress = document.getElementById("nprogress");
progress && removeElement(progress);
};
NProgress.remove = function () {
removeClass(document.documentElement, 'nprogress-busy');
removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
var progress = document.getElementById('nprogress');
progress && removeElement(progress);
};
/**
* Checks if the progress bar is rendered.
*/
/**
* Checks if the progress bar is rendered.
*/
NProgress.isRendered = function () {
return !!document.getElementById("nprogress");
};
NProgress.isRendered = function () {
return !!document.getElementById('nprogress');
};
/**
* Determine which positioning CSS rule to use.
*/
/**
* Determine which positioning CSS rule to use.
*/
NProgress.getPositioningCSS = function () {
// Sniff on document.body.style
var bodyStyle = document.body.style;
NProgress.getPositioningCSS = function () {
// Sniff on document.body.style
var bodyStyle = document.body.style;
// Sniff prefixes
var vendorPrefix =
"WebkitTransform" in bodyStyle
? "Webkit"
: "MozTransform" in bodyStyle
? "Moz"
: "msTransform" in bodyStyle
? "ms"
: "OTransform" in bodyStyle
? "O"
: "";
// Sniff prefixes
var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
('MozTransform' in bodyStyle) ? 'Moz' :
('msTransform' in bodyStyle) ? 'ms' :
('OTransform' in bodyStyle) ? 'O' : '';
if (vendorPrefix + "Perspective" in bodyStyle) {
// Modern browsers with 3D support, e.g. Webkit, IE10
return "translate3d";
} else if (vendorPrefix + "Transform" in bodyStyle) {
// Browsers without 3D support, e.g. IE9
return "translate";
}
// Browsers without translate() support, e.g. IE7-8
return "margin";
};
if (vendorPrefix + 'Perspective' in bodyStyle) {
// Modern browsers with 3D support, e.g. Webkit, IE10
return 'translate3d';
} else if (vendorPrefix + 'Transform' in bodyStyle) {
// Browsers without 3D support, e.g. IE9
return 'translate';
} else {
// Browsers without translate() support, e.g. IE7-8
return 'margin';
}
};
/**
* Helpers
*/
/**
* Helpers
*/
function clamp(n, min, max) {
if (n < min) return min;
if (n > max) return max;
return n;
}
function clamp(n, min, max) {
if (n < min) return min;
if (n > max) return max;
return n;
}
/**
* (Internal) converts a percentage (`0..1`) to a bar translateX
* percentage (`-100%..0%`).
*/
/**
* (Internal) converts a percentage (`0..1`) to a bar translateX
* percentage (`-100%..0%`).
*/
function toBarPerc(n) {
return (-1 + n) * 100;
}
function toBarPerc(n) {
return (-1 + n) * 100;
}
/**
* (Internal) returns the correct CSS for changing the bar's
* position given an n percentage, and speed and ease from Settings
*/
function barPositionCSS(n, speed, ease) {
var barCSS;
/**
* (Internal) returns the correct CSS for changing the bar's
* position given an n percentage, and speed and ease from Settings
*/
if (Settings.positionUsing === "translate3d") {
barCSS = { transform: "translate3d(" + toBarPerc(n) + "%,0,0)" };
} else if (Settings.positionUsing === "translate") {
barCSS = { transform: "translate(" + toBarPerc(n) + "%,0)" };
} else {
barCSS = { "margin-left": toBarPerc(n) + "%" };
}
function barPositionCSS(n, speed, ease) {
var barCSS;
barCSS.transition = "all " + speed + "ms " + ease;
if (Settings.positionUsing === 'translate3d') {
barCSS = { transform: 'translate3d(' + toBarPerc(n) + '%,0,0)' };
} else if (Settings.positionUsing === 'translate') {
barCSS = { transform: 'translate(' + toBarPerc(n) + '%,0)' };
} else {
barCSS = { 'margin-left': toBarPerc(n) + '%' };
}
return barCSS;
}
barCSS.transition = 'all ' + speed + 'ms ' + ease;
/**
* (Internal) Queues a function to be executed.
*/
return barCSS;
}
var queue = (function () {
var pending = [];
/**
* (Internal) Queues a function to be executed.
*/
function next() {
var fn = pending.shift();
if (fn) {
fn(next);
}
}
var queue = (function () {
var pending = [];
return function (fn) {
pending.push(fn);
if (pending.length == 1) next();
};
})();
function next() {
var fn = pending.shift();
if (fn) {
fn(next);
}
}
/**
* (Internal) Applies css properties to an element, similar to the jQuery
* css method.
*
* While this helper does assist with vendor prefixed property names, it
* does not perform any manipulation of values prior to setting styles.
*/
return function (fn) {
pending.push(fn);
if (pending.length == 1) next();
};
})();
var css = (function () {
var cssPrefixes = ["Webkit", "O", "Moz", "ms"];
var cssProps = {};
/**
* (Internal) Applies css properties to an element, similar to the jQuery
* css method.
*
* While this helper does assist with vendor prefixed property names, it
* does not perform any manipulation of values prior to setting styles.
*/
function camelCase(string) {
return string.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function (match, letter) {
return letter.toUpperCase();
});
}
var css = (function () {
var cssPrefixes = ['Webkit', 'O', 'Moz', 'ms'],
cssProps = {};
function getVendorProp(name) {
var style = document.body.style;
if (name in style) return name;
function camelCase(string) {
return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function (match, letter) {
return letter.toUpperCase();
});
}
var i = cssPrefixes.length;
var capName = name.charAt(0).toUpperCase() + name.slice(1);
var vendorName;
while (i--) {
vendorName = cssPrefixes[i] + capName;
if (vendorName in style) return vendorName;
}
function getVendorProp(name) {
var style = document.body.style;
if (name in style) return name;
return name;
}
var i = cssPrefixes.length,
capName = name.charAt(0).toUpperCase() + name.slice(1),
vendorName;
while (i--) {
vendorName = cssPrefixes[i] + capName;
if (vendorName in style) return vendorName;
}
function getStyleProp(name) {
name = camelCase(name);
return cssProps[name] || (cssProps[name] = getVendorProp(name));
}
return name;
}
function applyCss(element, prop, value) {
prop = getStyleProp(prop);
element.style[prop] = value;
}
function getStyleProp(name) {
name = camelCase(name);
return cssProps[name] || (cssProps[name] = getVendorProp(name));
}
return function (element, properties) {
var args = arguments;
var prop;
var value;
function applyCss(element, prop, value) {
prop = getStyleProp(prop);
element.style[prop] = value;
}
if (args.length == 2) {
for (prop in properties) {
value = properties[prop];
if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
}
} else {
applyCss(element, args[1], args[2]);
}
};
})();
return function (element, properties) {
var args = arguments,
prop,
value;
/**
* (Internal) Determines if an element or space separated list of class names contains a class name.
*/
if (args.length == 2) {
for (prop in properties) {
value = properties[prop];
if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
}
} else {
applyCss(element, args[1], args[2]);
}
}
})();
function hasClass(element, name) {
var list = typeof element === "string" ? element : classList(element);
return list.indexOf(" " + name + " ") >= 0;
}
/**
* (Internal) Determines if an element or space separated list of class names contains a class name.
*/
/**
* (Internal) Adds a class to an element.
*/
function hasClass(element, name) {
var list = typeof element == 'string' ? element : classList(element);
return list.indexOf(' ' + name + ' ') >= 0;
}
function addClass(element, name) {
var oldList = classList(element);
var newList = oldList + name;
/**
* (Internal) Adds a class to an element.
*/
if (hasClass(oldList, name)) return;
function addClass(element, name) {
var oldList = classList(element),
newList = oldList + name;
// Trim the opening space.
element.className = newList.substring(1);
}
if (hasClass(oldList, name)) return;
/**
* (Internal) Removes a class from an element.
*/
// Trim the opening space.
element.className = newList.substring(1);
}
function removeClass(element, name) {
var oldList = classList(element);
var newList;
/**
* (Internal) Removes a class from an element.
*/
if (!hasClass(element, name)) return;
function removeClass(element, name) {
var oldList = classList(element),
newList;
// Replace the class name.
newList = oldList.replace(" " + name + " ", " ");
if (!hasClass(element, name)) return;
// Trim the opening and closing spaces.
element.className = newList.substring(1, newList.length - 1);
}
// Replace the class name.
newList = oldList.replace(' ' + name + ' ', ' ');
/**
* (Internal) Gets a space separated list of the class names on the element.
* The list is wrapped with a single space on each end to facilitate finding
* matches within the list.
*/
// Trim the opening and closing spaces.
element.className = newList.substring(1, newList.length - 1);
}
function classList(element) {
return (" " + ((element && element.className) || "") + " ").replace(/\s+/gi, " ");
}
/**
* (Internal) Gets a space separated list of the class names on the element.
* The list is wrapped with a single space on each end to facilitate finding
* matches within the list.
*/
/**
* (Internal) Removes an element from the DOM.
*/
function classList(element) {
return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' ');
}
function removeElement(element) {
element && element.parentNode && element.parentNode.removeChild(element);
}
/**
* (Internal) Removes an element from the DOM.
*/
function removeElement(element) {
element && element.parentNode && element.parentNode.removeChild(element);
}
return NProgress;
});
return NProgress;
});
"use strict";
/*globals ajaxify, socket*/
/* globals ajaxify, socket */
define("oxide/quickreply", ["components", "composer/autocomplete"], (components, autocomplete) => {
let QuickReply = {};
const QuickReply = {};

@@ -21,5 +21,4 @@ QuickReply.init = () => {

$(window).trigger("composer:autocomplete:init", data);
autocomplete._active.oxide_qr = autocomplete.setup(data);
autocomplete._active["oxide_qr"] = autocomplete.setup(data);
components.get("topic/quickreply/button").on("click", (e) => {

@@ -37,9 +36,6 @@ e.preventDefault();

if (err) return app.alertError(err.message);
if (data && data.queued) app.alertSuccess(data.message);
if (data && data.queued) {
components.get("topic/quickreply/text").val("");
autocomplete._active["oxide_qr"].hide();
app.alertSuccess(data.message);
}
components.get("topic/quickreply/text").val("");
autocomplete._active.oxide_qr.hide();
});

@@ -46,0 +42,0 @@ });

/* globals ajaxify */
"use strict";
(() => {
"use strict";
const isDefault = document.documentElement.dataset.initialDark === "true";

@@ -7,0 +7,0 @@ if (isDefault) return;

"use strict";
/*globals ajaxify, config, utils, socket, NProgress*/
/* globals ajaxify, config, utils, socket, NProgress */

@@ -60,5 +60,3 @@ $(document).ready(() => {

el.css("background-color", user["icon:bgColor"])
.text(user["icon:text"])
.addClass("user-icon");
el.css("background-color", user["icon:bgColor"]).text(user["icon:text"]).addClass("user-icon");
}

@@ -75,5 +73,3 @@ });

socket.on("event:chats.markedAsRead", ({ roomId }) => {
$(`#taskbar [data-roomId="${roomId}"]`)
.removeClass("new")
.attr("data-content", 0);
$(`#taskbar [data-roomId="${roomId}"]`).removeClass("new").attr("data-content", 0);
});

@@ -86,3 +82,8 @@

if (module === "composer") return (options.icon = "fa-commenting-o");
if (module === "composer") {
options.icon = "fa-commenting-o";
return options.icon;
}
if (module === "chat") {

@@ -102,17 +103,9 @@ if (!element.length) {

const activateEditedTooltips = () => {
$('[data-pid] [component="post/editor"]').each(function() {
$('[data-pid] [component="post/editor"]').each(function () {
const el = $(this);
let icon;
if (!el.attr("data-editor")) return;
icon = el
.closest("[data-pid]")
.find(".edit-icon")
.first();
const icon = el.closest("[data-pid]").find(".edit-icon").first();
icon
.prop("title", el.text())
.tooltip("fixTitle")
.removeClass("hidden");
icon.prop("title", el.text()).tooltip("fixTitle").removeClass("hidden");
});

@@ -126,16 +119,6 @@ };

const icon = parent.find(".edit-icon").filter((index, el) => {
return (
parseInt(
$(el)
.closest("[data-pid]")
.attr("data-pid"),
10
) === parseInt(data.post.pid, 10)
);
return parseInt($(el).closest("[data-pid]").attr("data-pid"), 10) === parseInt(data.post.pid, 10);
});
icon
.prop("title", el.text())
.tooltip("fixTitle")
.removeClass("hidden");
icon.prop("title", el.text()).tooltip("fixTitle").removeClass("hidden");
};

@@ -152,3 +135,3 @@

require(["pulling", "storage"], (Pulling, Storage) => {
let chatMenuVisible = !config.disableChat && app.user && parseInt(app.user.uid, 10);
const chatMenuVisible = !config.disableChat && app.user && parseInt(app.user.uid, 10);
let swapped = !!Storage.getItem("oxide:menus:legacy-layout");

@@ -164,3 +147,3 @@ const margin = window.innerWidth;

let navSlideout = Pulling.create({
const navSlideout = Pulling.create({
panel: document.querySelector("#panel"),

@@ -227,3 +210,3 @@ menu: document.querySelector("#menu"),

.on("beforeopen", onBeforeOpen)
.on("opened", function() {
.on("opened", function () {
$("#panel").one("click", closeOnClick);

@@ -261,6 +244,3 @@ });

$("#user-control-list")
.children()
.clone(true, true)
.appendTo($('#menu [data-section="profile"] ul'));
$("#user-control-list").children().clone(true, true).appendTo($('#menu [data-section="profile"] ul'));

@@ -348,4 +328,4 @@ socket.on("event:user_status_change", (data) => {

function generateUserCard(ev) {
let avatar = $(this);
let index = avatar.parents("[data-index]").attr("data-index");
const avatar = $(this);
const index = avatar.parents("[data-index]").attr("data-index");
let data = ajaxify.data.topics || ajaxify.data.posts;

@@ -365,2 +345,4 @@

socket.emit("user.isFollowing", { uid: data.uid }, (err, isFollowing) => {
if (err) return null;
app.parseAndTranslate("modules/usercard", data, (html) => {

@@ -409,6 +391,6 @@ var card = $(html);

function setupFavouriteMorph(parent, uid, username) {
parent.find(".btn-morph").click(function(ev) {
parent.find(".btn-morph").click(function (ev) {
var type = $(this).hasClass("plus") ? "follow" : "unfollow";
socket.emit("user." + type, { uid: uid }, function(err) {
socket.emit("user." + type, { uid: uid }, function (err) {
if (err) {

@@ -421,5 +403,3 @@ return app.alertError(err.message);

$(this)
.toggleClass("plus")
.toggleClass("heart");
$(this).toggleClass("plus").toggleClass("heart");
$(this).translateAttr("title", type === "follow" ? "[[global:unfollow]]" : "[[global:follow]]");

@@ -431,7 +411,5 @@

var drop = $(this)
.find("b.drop")
.removeClass("animate"),
x = ev.pageX - drop.width() / 2 - $(this).offset().left,
y = ev.pageY - drop.height() / 2 - $(this).offset().top;
var drop = $(this).find("b.drop").removeClass("animate");
var x = ev.pageX - drop.width() / 2 - $(this).offset().left;
var y = ev.pageY - drop.height() / 2 - $(this).offset().top;

@@ -438,0 +416,0 @@ drop.css({ top: y + "px", left: x + "px" }).addClass("animate");

{
"name": "nodebb-theme-oxide",
"version": "5.0.47",
"version": "6.0.0",
"description": "A theme that is based on the GitHub design.",

@@ -48,11 +48,11 @@ "keywords": [

"eslint": "^6.6.0",
"eslint-config-prettier": "^6.10.1",
"husky": "^4.2.3",
"lint-staged": "^10.1.2",
"eslint-config-prettier": "^6.11.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"minimist": "^1.2.5",
"prettier": "^2.0.4"
"prettier": "^2.0.5"
},
"nbbpm": {
"compatibility": "^1.13.1"
"compatibility": "^1.14.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc