This repository was archived by the owner on Jan 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Added dogescript #12
Open
ThomasHickman
wants to merge
9
commits into
MemeTrash:master
Choose a base branch
from
ThomasHickman:dogescript
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Added dogescript #12
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
361f36e
Dne obv. ds stff
ThomasHickman dba566b
Such tabs. mUch correct
ThomasHickman e00482b
Much finish
ThomasHickman eed03ec
Debugged djs file
ThomasHickman b4b8736
Added dogescript compile on load
ThomasHickman c2a680d
Added webpack bundle to compile dogescript files
ThomasHickman 8530da6
Added powered by dogescript
ThomasHickman 9044cde
Contructed animations using statements
ThomasHickman be12f67
Locked down the version of dogescript
ThomasHickman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var dogescript = require("dogescript"); | ||
|
||
var dsScripts = Array.from(document.querySelectorAll("script")).filter(function (x) { | ||
return x.type === "text/dogescript"; | ||
}); | ||
|
||
dsScripts.forEach(function (script) { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.onreadystatechange = function () { | ||
if (xhr.readyState == XMLHttpRequest.DONE) { | ||
eval.call(window, dogescript(xhr.responseText, false, false)); | ||
} | ||
}; | ||
xhr.open('GET', script.src, true); | ||
xhr.send(); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
such setStyle much elementID property value | ||
very element is plz dogeument.getElementById with elementID | ||
plz element.style.setProperty with property value | ||
wow | ||
|
||
such hideLoadingScreen | ||
plz setStyle with "loadingElement" "display" "none" | ||
wow | ||
|
||
plz $ with much | ||
wow& hideLoadingScreen() | ||
|
||
very animations = [/* | ||
*/ "spin", | ||
"zoom", | ||
"bg", | ||
"invert", | ||
"blur", | ||
"rainbow" | ||
]; | ||
|
||
such displayLoadingScreen | ||
very animationToUse is animations[Math.floor(Math.random() * animations.length)] | ||
plz setStyle with "loadingElement" "display" "block" | ||
plz setStyle with "loadingTrollFaceScreen" "animationName" animationToUse | ||
wow | ||
|
||
such getImages much query | ||
plz displayLoadingScreen | ||
|
||
very rnd is maybe shh Keep this comment | ||
shh Keep this line as well | ||
very displayType is rnd ? 'cat' : 'doge' | ||
|
||
very postOb is {} | ||
postOb.url is "https://api.memetrash.co.uk/" dose concat with displayType | ||
postOb.crossDomain is true | ||
postOb.data is {} | ||
postOb.data.text is query | ||
postOb.data.quantity is 3 | ||
|
||
$ dose post with postOb& | ||
dose done with much httpData | ||
very imageCont is document dose createElement with "div" | ||
imageCont.id is "downloadedImageInner" | ||
|
||
httpData["data"]["images"] dose forEach with much image | ||
very newImage is document dose createElement with "img" | ||
newImage.src is image; | ||
imageCont dose appendChild with newImage | ||
wow& | ||
|
||
plz setStyle with "downloadedImageOuter" "display" "block" | ||
|
||
very outerImg is document dose getElementById with "downloadedImageOuter" | ||
very innerImg is document dose getElementById with "downloadedImageInner" | ||
|
||
outerImg dose replaceChild with imageCont innerImg | ||
plz hideLoadingScreen | ||
wow& | ||
.plz fail with much error | ||
plz hideLoadingScreen | ||
plz alert "YOU HAZ ERRORS" | ||
wow& | ||
wow | ||
|
||
such postForm | ||
very inputBox is document dose getElementById with "inputBox" | ||
rly inputBox.value not "" | ||
plz getImages with inputBox.value | ||
but | ||
very promptStr is "Enter a value" | ||
plz alert with promptStr | ||
wow | ||
wow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "meme-generator-web", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "compile.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"prepublish": "npm run-script build", | ||
"build": "webpack -p" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"dogescript": "^2.3.0" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
entry: './compile.js', | ||
output: { | ||
filename: './compileDJS.js' | ||
}, | ||
resolve: { | ||
extensions: ['', '.webpack.js', '.web.js', '.js', '.json'] | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need that comment anymore tbh
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is needed because dogescript adds a semicolon to the end of every line starting with "very". I'll change this to statements constructing the array instead though e.g
animations dose push "zoom"
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done this in 9044cde