Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
define("main", function(require) {
var $ = require("bootstrap");
var badgeTemplate = require("template!badge");
var achievementTemplate = require("template!achievement");
var FriendlycodeEditor = require("friendlycode");
var HtmlBadges = require("html-badges");
var Gapingbadger = require("badges/gapingbadger");
var getWikiBadges = require("badges/get-wiki-badges");
var badger = Gapingbadger("http://gapingbadger.toolness.org");
var wikiBadges = {};
var fc = FriendlycodeEditor({
publishURL: "https://webpagemaker-dev.allizom.org",
container: $("#fc")
});
var wikiReq = $.Deferred();
var userBadgesReq = $.Deferred();
var readyToAwardBadges = $.when(wikiReq, userBadgesReq, fc.ready);
/* Scrape available badges from the Mozilla wiki. */
getWikiBadges('/Webmakers/SampleBadges', function(badges) {
$.extend(wikiBadges, badges);
wikiReq.resolve();
});
/* Manage BrowserID-based authentication semantics. */
badger.checkLogin({
success: function() {
$("html").removeClass("logged-out").addClass("logged-in");
$(".email").text(badger.email);
badger.fetch(function(err) {
define("main", function(require) {
var $ = require("bootstrap");
var badgeTemplate = require("template!badge");
var achievementTemplate = require("template!achievement");
var FriendlycodeEditor = require("friendlycode");
var HtmlBadges = require("html-badges");
var Gapingbadger = require("badges/gapingbadger");
var getWikiBadges = require("badges/get-wiki-badges");
var badger = Gapingbadger("http://gapingbadger.toolness.org");
var wikiBadges = {};
var fc = FriendlycodeEditor({
publishURL: "https://webpagemaker-dev.allizom.org",
container: $("#fc")
});
var wikiReq = $.Deferred();
var userBadgesReq = $.Deferred();
var readyToAwardBadges = $.when(wikiReq, userBadgesReq, fc.ready);
/* Scrape available badges from the Mozilla wiki. */
getWikiBadges('/Webmakers/SampleBadges', function(badges) {
$.extend(wikiBadges, badges);
wikiReq.resolve();
});
/* Manage BrowserID-based authentication semantics. */
badger.checkLogin({
success: function() {
$("html").removeClass("logged-out").addClass("logged-in");
$(".email").text(badger.email);