From 30e0c596527a8e2d1ce3354bc5a417d844a4ac0f Mon Sep 17 00:00:00 2001 From: Will Schumacher Date: Tue, 31 May 2016 21:36:34 -0700 Subject: [PATCH 01/34] Clarify description. --- .../01-front-end-development-certification/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/jquery.json b/seed/challenges/01-front-end-development-certification/jquery.json index d78d273b7e..a3117d32fb 100644 --- a/seed/challenges/01-front-end-development-certification/jquery.json +++ b/seed/challenges/01-front-end-development-certification/jquery.json @@ -625,7 +625,7 @@ "jQuery has a function called .html() that lets you add HTML tags and text within an element. Any content previously within the element will be completely replaced with the content you provide using this function.", "Here's how you would rewrite and emphasize the text of our heading:", "$(\"h3\").html(\"<em>jQuery Playground</em>\");", - "jQuery also has a similar function called .text() that only alters text without adding tags. In other words, this function will not evaluate any HTML tags passed to it, but will instead treat it as text you want to replace with.", + "jQuery also has a similar function called .text() that only alters text without adding tags. In other words, this function will not evaluate any HTML tags passed to it, but will instead treat it as the text you want to replace the existing content with.", "Change the button with id target4 by emphasizing its text." ], "releasedOn": "November 18, 2015", From 37c4ef31bfcec6324cde9afb7cc1dcbaccf60b99 Mon Sep 17 00:00:00 2001 From: Tian Zhou Date: Thu, 2 Jun 2016 20:36:21 -0700 Subject: [PATCH 02/34] Fix MDN links --- seed/bonfireMDNlinks.js | 66 +++++++++---------- .../advanced-bonfires.json | 8 +-- .../basic-bonfires.json | 34 +++++----- .../intermediate-bonfires.json | 52 +++++++-------- 4 files changed, 80 insertions(+), 80 deletions(-) diff --git a/seed/bonfireMDNlinks.js b/seed/bonfireMDNlinks.js index 12d13e26ab..2c5087e453 100644 --- a/seed/bonfireMDNlinks.js +++ b/seed/bonfireMDNlinks.js @@ -38,46 +38,46 @@ var links = { // ========== OBJECT METHODS "Object.getOwnPropertyNames()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames", "Object.keys()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys", - "Object.hasOwnProperty()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty", + "Object.prototype.hasOwnProperty()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty", // ======== STRING METHODS - "String.charAt()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt", + "String.prototype.charAt()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt", "String.prototype.charCodeAt()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt", - "String.concat()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat", - "String.indexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf", + "String.prototype.concat()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat", + "String.prototype.indexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf", "String.fromCharCode()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode", - "String.lastIndexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf", - "String.match()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match", - "String.replace()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace", - "String.slice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice", - "String.split()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split", - "String.substring()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring", - "String.substr()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr", - "String.toLowerCase()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase", - "String.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toString", - "String.toUpperCase()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase", + "String.prototype.lastIndexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf", + "String.prototype.match()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match", + "String.prototype.replace()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace", + "String.prototype.slice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice", + "String.prototype.split()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split", + "String.prototype.substring()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring", + "String.prototype.substr()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr", + "String.prototype.toLowerCase()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase", + "String.prototype.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toString", + "String.prototype.toUpperCase()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase", // ======== ARRAY METHODS - "Array.concat()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat", - "Array.every()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every", - "Array.filter()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter", - "Array.forEach()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach", - "Array.indexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf", + "Array.prototype.concat()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat", + "Array.prototype.every()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every", + "Array.prototype.filter()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter", + "Array.prototype.forEach()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach", + "Array.prototype.indexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf", "Array.isArray()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray", - "Array.join()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join", - "Array.lastIndexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf", - "Array.map()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map", - "Array.pop()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop", - "Array.push()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push", - "Array.reduce()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce", - "Array.reverse()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse", - "Array.shift()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift", - "Array.slice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice", - "Array.some()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some", - "Array.sort()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort", - "Array.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice", - "Array.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString", + "Array.prototype.join()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join", + "Array.prototype.lastIndexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf", + "Array.prototype.map()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map", + "Array.prototype.pop()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop", + "Array.prototype.push()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push", + "Array.prototype.reduce()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce", + "Array.prototype.reverse()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse", + "Array.prototype.shift()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift", + "Array.prototype.slice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice", + "Array.prototype.some()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some", + "Array.prototype.sort()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort", + "Array.prototype.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice", + "Array.prototype.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString", // ======== STATEMENTS AND DECLARATIONS "Switch Statement": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch", @@ -86,7 +86,7 @@ var links = { "Math.max()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max", "Math.min()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min", "Math.pow()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow", - "Remainder": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Remainder_(.25)", + "Remainder": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Remainder", // ======== GENERAL JAVASCRIPT REFERENCES "Arithmetic Operators": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators", diff --git a/seed/challenges/01-front-end-development-certification/advanced-bonfires.json b/seed/challenges/01-front-end-development-certification/advanced-bonfires.json index d4dfdf0928..1ff84823ac 100644 --- a/seed/challenges/01-front-end-development-certification/advanced-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/advanced-bonfires.json @@ -99,7 +99,7 @@ ], "type": "bonfire", "MDNlinks": [ - "Array.reduce()", + "Array.prototype.reduce()", "Symmetric Difference" ], "challengeType": 5, @@ -297,8 +297,8 @@ ], "type": "bonfire", "MDNlinks": [ - "String.split()", - "String.substr()", + "String.prototype.split()", + "String.prototype.substr()", "parseInt()" ], "challengeType": 5, @@ -436,7 +436,7 @@ ], "type": "bonfire", "MDNlinks": [ - "Array.reduce()" + "Array.prototype.reduce()" ], "challengeType": 5, "titleEs": "En parejas", diff --git a/seed/challenges/01-front-end-development-certification/basic-bonfires.json b/seed/challenges/01-front-end-development-certification/basic-bonfires.json index 7eb7cc5772..53366ce748 100644 --- a/seed/challenges/01-front-end-development-certification/basic-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/basic-bonfires.json @@ -95,9 +95,9 @@ ], "MDNlinks": [ "Global String Object", - "String.split()", - "Array.reverse()", - "Array.join()" + "String.prototype.split()", + "Array.prototype.reverse()", + "Array.prototype.join()" ], "challengeType": 5, "titleEs": "Invierte el texto", @@ -190,8 +190,8 @@ "function palindrome(str) {\n var string = str.toLowerCase().split(/[^A-Za-z0-9]/gi).join('');\n var aux = string.split('');\n if (aux.join('') === aux.reverse().join('')){\n return true;\n }\n\n return false;\n}" ], "MDNlinks": [ - "String.replace()", - "String.toLowerCase()" + "String.prototype.replace()", + "String.prototype.toLowerCase()" ], "challengeType": 5, "titleEs": "Verifica si es palíndromo", @@ -232,7 +232,7 @@ "function findLongestWord(str) {\n return str.split(' ').sort(function(a, b) { return b.length - a.length;})[0].length;\n}\n\nfindLongestWord('The quick brown fox jumped over the lazy dog');\n" ], "MDNlinks": [ - "String.split()", + "String.prototype.split()", "String.length" ], "challengeType": 5, @@ -270,7 +270,7 @@ "function titleCase(str) {\n return str.split(' ').map(function(word) {\n return word.charAt(0).toUpperCase() + word.substring(1).toLowerCase();\n }).join(' ');\n}\n\ntitleCase(\"I'm a little tea pot\");\n" ], "MDNlinks": [ - "String.split()" + "String.prototype.split()" ], "challengeType": 5, "titleEs": "Aplica formato de título", @@ -349,7 +349,7 @@ "function confirmEnding(str, target) {\n return str.substring(str.length-target.length) === target;\n};\n" ], "MDNlinks": [ - "String.substr()" + "String.prototype.substr()" ], "challengeType": 5, "titleEs": "Confirma la terminación", @@ -427,7 +427,7 @@ "function truncateString(str, num) {\n if(str.length > num ) {\n if(num > 3) {\n return str.slice(0, num - 3) + '...';\n } else {\n return str.slice(0,num) + '...';\n }\n } \n return str;\n}" ], "MDNlinks": [ - "String.slice()" + "String.prototype.slice()" ], "challengeType": 5, "titleEs": "Trunca una cadena de texto", @@ -467,8 +467,8 @@ "function chunkArrayInGroups(arr, size) {\n var out = [];\n for (var i = 0; i < arr.length; i+=size) {\n out.push(arr.slice(i,i+size));\n }\n return out;\n}\n\nchunkArrayInGroups(['a', 'b', 'c', 'd'], 2);\n" ], "MDNlinks": [ - "Array.push()", - "Array.slice()" + "Array.prototype.push()", + "Array.prototype.slice()" ], "challengeType": 5, "titleEs": "En mil pedazos", @@ -507,8 +507,8 @@ "function slasher(arr, howMany) {\n // it doesn't always pay to be first\n return arr.slice(howMany);\n}\n\nslasher([1, 2, 3], 2);\n" ], "MDNlinks": [ - "Array.slice()", - "Array.splice()" + "Array.prototype.slice()", + "Array.prototype.splice()" ], "challengeType": 5, "titleEs": "Vuélale la cabeza", @@ -552,7 +552,7 @@ "function mutation(arr) {\n var hash = Object.create(null);\n arr[0].toLowerCase().split('').forEach(function(c) {\n hash[c] = true;\n });\n return !arr[1].toLowerCase().split('').filter(function(c) {\n return !hash[c];\n }).length;\n}\n\nmutation(['hello', 'hey']);\n" ], "MDNlinks": [ - "String.indexOf()" + "String.prototype.indexOf()" ], "challengeType": 5, "titleEs": "Mutaciones", @@ -593,7 +593,7 @@ ], "MDNlinks": [ "Boolean Objects", - "Array.filter()" + "Array.prototype.filter()" ], "challengeType": 5, "titleEs": "Detector de mentiras", @@ -632,7 +632,7 @@ ], "MDNlinks": [ "Arguments object", - "Array.filter()" + "Array.prototype.filter()" ], "challengeType": 5, "titleEs": "Buscar y destruir", @@ -673,7 +673,7 @@ "function getIndexToIns(arr, num) {\n arr = arr.sort(function(a, b){return a-b;});\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] >= num)\n {\n return i;\n }\n }\n return arr.length;\n}" ], "MDNlinks": [ - "Array.sort()" + "Array.prototype.sort()" ], "challengeType": 5, "titleEs": "¿Cuál es mi asiento?", diff --git a/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json b/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json index 92effd583c..949c7848f2 100644 --- a/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json @@ -33,7 +33,7 @@ "MDNlinks": [ "Math.max()", "Math.min()", - "Array.reduce()" + "Array.prototype.reduce()" ], "isRequired": true, "challengeType": 5, @@ -82,10 +82,10 @@ "type": "bonfire", "MDNlinks": [ "Comparison Operators", - "Array.slice()", - "Array.filter()", - "Array.indexOf()", - "Array.concat()" + "Array.prototype.slice()", + "Array.prototype.filter()", + "Array.prototype.indexOf()", + "Array.prototype.concat()" ], "isRequired": true, "challengeType": 5, @@ -148,9 +148,9 @@ "type": "bonfire", "MDNlinks": [ "Roman Numerals", - "Array.splice()", - "Array.indexOf()", - "Array.join()" + "Array.prototype.splice()", + "Array.prototype.indexOf()", + "Array.prototype.join()" ], "isRequired": true, "challengeType": 5, @@ -200,7 +200,7 @@ "type": "bonfire", "MDNlinks": [ "Global Object", - "Object.hasOwnProperty()", + "Object.prototype.hasOwnProperty()", "Object.keys()" ], "isRequired": true, @@ -248,9 +248,9 @@ ], "type": "bonfire", "MDNlinks": [ - "Array.splice()", - "String.replace()", - "Array.join()" + "Array.prototype.splice()", + "String.prototype.replace()", + "Array.prototype.join()" ], "isRequired": true, "challengeType": 5, @@ -301,11 +301,11 @@ ], "type": "bonfire", "MDNlinks": [ - "Array.indexOf()", - "Array.push()", - "Array.join()", - "String.substr()", - "String.split()" + "Array.prototype.indexOf()", + "Array.prototype.push()", + "Array.prototype.join()", + "String.prototype.substr()", + "String.prototype.split()" ], "isRequired": true, "challengeType": 5, @@ -352,8 +352,8 @@ ], "type": "bonfire", "MDNlinks": [ - "Array.push()", - "String.split()" + "Array.prototype.push()", + "String.prototype.split()" ], "isRequired": true, "challengeType": 5, @@ -499,7 +499,7 @@ "type": "bonfire", "MDNlinks": [ "Arguments object", - "Array.reduce()" + "Array.prototype.reduce()" ], "isRequired": true, "challengeType": 5, @@ -551,7 +551,7 @@ "MDNlinks": [ "RegExp", "HTML Entities", - "String.replace()" + "String.prototype.replace()" ], "isRequired": true, "challengeType": 5, @@ -595,7 +595,7 @@ "type": "bonfire", "MDNlinks": [ "RegExp", - "String.replace()" + "String.prototype.replace()" ], "isRequired": true, "challengeType": 5, @@ -685,7 +685,7 @@ "type": "bonfire", "MDNlinks": [ "For Loops", - "Array.push()" + "Array.prototype.push()" ], "isRequired": true, "challengeType": 5, @@ -775,7 +775,7 @@ ], "type": "bonfire", "MDNlinks": [ - "Array.filter()" + "Array.prototype.filter()" ], "isRequired": true, "challengeType": 5, @@ -821,8 +821,8 @@ "type": "bonfire", "MDNlinks": [ "Arguments object", - "Array.shift()", - "Array.slice()" + "Array.prototype.shift()", + "Array.prototype.slice()" ], "isRequired": true, "challengeType": 5, From 3ef7d18fc0723901f80b9053f513c8051200240f Mon Sep 17 00:00:00 2001 From: Stuart Date: Wed, 1 Jun 2016 12:31:37 +0100 Subject: [PATCH 03/34] FIX Unfinished Function Declaration in Comments --- client/commonFramework/detect-unsafe-code-stream.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/commonFramework/detect-unsafe-code-stream.js b/client/commonFramework/detect-unsafe-code-stream.js index 14ed08f77b..ccf81a77de 100644 --- a/client/commonFramework/detect-unsafe-code-stream.js +++ b/client/commonFramework/detect-unsafe-code-stream.js @@ -5,6 +5,9 @@ window.common = (function(global) { } = global; const detectFunctionCall = /function\s*?\(|function\s+\w+\s*?\(/gi; + const detectInComment = new RegExp(['\\/\\/[\\W\\w\\s]*?function.|', + '\\/\\*[\\s\\w\\W]*?function', + '[\\s\\W\\w]*?\\*\\/'].join(''), 'gi'); const detectUnsafeJQ = /\$\s*?\(\s*?\$\s*?\)/gi; const detectUnsafeConsoleCall = /if\s\(null\)\sconsole\.log\(1\);/gi; @@ -35,7 +38,8 @@ window.common = (function(global) { if ( code.match(/function/g) && - !code.match(detectFunctionCall) + !code.match(detectFunctionCall) && + !code.match(detectInComment) ) { return Observable.throw( new Error('SyntaxError: Unsafe or unfinished function declaration') From a0b4a4d3d1612088f62f1a185b6f5f2815c4952d Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 10 Jun 2016 15:29:29 +0100 Subject: [PATCH 04/34] Removed duplicate help button --- server/views/challenges/showHTML.jade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/views/challenges/showHTML.jade b/server/views/challenges/showHTML.jade index e68b3c6cc1..30eb018c6a 100644 --- a/server/views/challenges/showHTML.jade +++ b/server/views/challenges/showHTML.jade @@ -30,9 +30,8 @@ block content .btn-group.btn-group-justified .btn-group button.btn.btn-primary.btn-primary-ghost.btn-lg#trigger-reset-modal Reset - a.btn.btn-primary.btn-primary-ghost.hidden-sm.hidden-md.hidden-lg(href='//gitter.im/freecodecamp/help') Help .btn-group - button.btn.btn-primary.btn-primary-ghost.hidden-xs.btn-lg#challenge-help-btn Help + button.btn.btn-primary.btn-primary-ghost.btn-lg#challenge-help-btn Help .btn-group button.btn.btn-primary.btn-primary-ghost.btn-lg#trigger-issue-modal Bug script. From db855143d5bb4b18fa90a42eab3758362ea4dfa2 Mon Sep 17 00:00:00 2001 From: alayek Date: Fri, 10 Jun 2016 23:05:43 +0530 Subject: [PATCH 05/34] Update Palindrome instructions --- .../01-front-end-development-certification/basic-bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed/challenges/01-front-end-development-certification/basic-bonfires.json b/seed/challenges/01-front-end-development-certification/basic-bonfires.json index df254b7765..a18245475e 100644 --- a/seed/challenges/01-front-end-development-certification/basic-bonfires.json +++ b/seed/challenges/01-front-end-development-certification/basic-bonfires.json @@ -158,6 +158,7 @@ "A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.", "Note
You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything lower case in order to check for palindromes.", "We'll pass strings with varying formats, such as \"racecar\", \"RaceCar\", and \"race CAR\" among others.", + "We'll also pass strings with special symbols, such as \"2A3*3a2\", \"2A3 3a2\", and \"2_A3*3#A2\".", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ From 78bbf1e7676eb4fcf771b1082e10a43cdd859993 Mon Sep 17 00:00:00 2001 From: DealPete Date: Fri, 10 Jun 2016 19:30:04 -0230 Subject: [PATCH 06/34] Fixed 'Write Reusable JavaScript with Functions' head and tail --- .../basic-javascript.json | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 7ac5e11aca..387ffc2449 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -2041,19 +2041,7 @@ "

Instructions

", "
  1. Create a function called reusableFunction which prints \"Hi World\" to the dev console.
  2. Call the function.
" ], - "challengeSeed": [ - "// Example", - "function reusableFunction() {", - " console.log(\"Heyya, World\");", - "}", - "", - "reusableFunction();", - "", - "// Only change code below this line", - "", - "" - ], - "tail": [ + "head": [ "var logOutput = \"\";", "var originalConsole = console", "function capture() {", @@ -2073,12 +2061,26 @@ " console.log = originalConsole.log;", "}", "", + "capture();" + ], + "challengeSeed": [ + "// Example", + "function reusableFunction() {", + " console.log(\"Heyya, World\");", + "}", + "", + "reusableFunction();", + "", + "// Only change code below this line", + "", + "" + ], + "tail": [ + "uncapture();", + "", "if (typeof reusableFunction !== \"function\") { ", " (function() { return \"reusableFunction is not defined\"; })();", "} else {", - " capture();", - " reusableFunction(); ", - " uncapture();", " (function() { return logOutput || \"console.log never called\"; })();", "}" ], From ab2b72427ab100100fe11829475995e3cd66282f Mon Sep 17 00:00:00 2001 From: Stuart Date: Sat, 11 Jun 2016 06:14:33 +0100 Subject: [PATCH 07/34] Fix/Change the Font Size of an Element --- .../01-front-end-development-certification/html5-and-css.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/html5-and-css.json b/seed/challenges/01-front-end-development-certification/html5-and-css.json index b51b6a8d5c..2a08cef761 100644 --- a/seed/challenges/01-front-end-development-certification/html5-and-css.json +++ b/seed/challenges/01-front-end-development-certification/html5-and-css.json @@ -733,8 +733,8 @@ "assert($(\"p\").length > 1, 'message: You need 2 p elements with Kitty Ipsum text.');", "assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/

p elements has a closing tag.');", "assert.isTrue((/Purr\\s+jump\\s+eat/gi).test($(\"p\").text()), 'message: Your p element should contain the first few words of the provided additional kitty ipsum text.');", - "assert($(\"p:not([class])\").length === 1, 'message: Do not add a class attribute to the second p element.');", - "assert(parseInt($(\"p:not([class])\").css(\"font-size\"), 10) > 15, 'message: Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.');" + "assert(code.match(/

Purr jump eat the grass/), 'message: Do not add a class attribute to the second p element.');", + "assert(code.match(/