id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
nevir/groc:lib/styles/default/behavior.coffee:10:completion
completion
buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li class="toggle">Table of Contents</li> <li class="search"><input id="search" type="searc...
</div> </nav> """).appendTo $('body') toc$ = nav$.find '.toc' for node in tableOfContents toc$.append buildTOCNode node, relativeRoot nav$
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
104
121
nevir/groc:lib/styles/default/behavior.coffee:11:raw_corpus
raw_corpus
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#{node.data.title}</span> </a> <span class...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
123
172
nevir/groc:lib/styles/default/behavior.coffee:11:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#...
var buildTOCNode; buildTOCNode = function(node, relativeRoot, parentFile) { var c, children$, discloser$, i, j, label$, len, len1, node$, outline$, ref, ref1, ref2, ref3, ref4, ref5; node$ = $(`<li class="${node.type}"/>`); switch (node.type) { case 'file': node$.append(`<a class="label" href="${relati...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
123
172
nevir/groc:lib/styles/default/behavior.coffee:11:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildTOCNode; buildTOCNode = function(node, relativeRoot, parentFile) { var c, children$, discloser$, i, j, label$, len, len1, node$, outline$, ref, ref1, ref2, ref3, ref4, ref5; node$ = $(`<li class="${node.type}"/>`); switch (node.type) { case 'fil...
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#{node.data.title}</span> </a> <span class...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
123
172
nevir/groc:lib/styles/default/behavior.coffee:11:completion
completion
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#{node.data.title}</span> </a> <span class...
node$.append outline$ if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ label$ = node$.find('> .label') label$.click -> selectNode node$ discloser$ = $('<span class="disclos...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
123
172
nevir/groc:lib/styles/default/behavior.coffee:12:raw_corpus
raw_corpus
nav$ = buildNav relativeRoot toc$ = nav$.find '.toc' # Select the current file, and expand up to it selectNodeByDocumentPath documentPath, window.location.hash.replace '#', '' # Set up the table of contents toggle toggle$ = nav$.find '.toggle' toggle$.click (evt) -> toggleTableOfContents() evt.pr...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
173
203
nevir/groc:lib/styles/default/behavior.coffee:12:completion
completion
nav$ = buildNav relativeRoot toc$ = nav$.find '.toc' # Select the current file, and expand up to it selectNodeByDocumentPath documentPath, window.location.hash.replace '#', '' # Set up the table of contents toggle toggle$ = nav$.find '.toggle' toggle$.click (evt) -> toggleTableOfContents() evt.pr...
toggle$.mousedown (evt) -> evt.preventDefault() # Arrow keys navigate the table of contents whenever it is visible $('body').keydown (evt) -> if nav$.hasClass 'active' switch evt.keyCode when 13 then visitCurrentNode() # return when 37 then setCurrentNodeExpanded false # left ...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4945118095bb67f813fd1dd8c3406a8859c697ef
579
https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/styles/default/behavior.coffee
173
203
nevir/groc:lib/styles/default/behavior.coffee:3:raw_corpus
raw_corpus
focusCurrentNode = -> # WebKit strangeness - calling scrollIntoView() causes the entire page to scroll! currentScrollTop = $(window).scrollTop() currentNode$[0].scrollIntoView() $(window).scrollTop currentScrollTop
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
25
29
nevir/groc:lib/styles/default/behavior.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript focusCurrentNode = -> # WebKit strangeness - calling scrollIntoView() causes the entire page to scroll! currentScrollTop = $(window).scrollTop() currentNode$[0].scrollIntoView() $(window).scrollTop currentScrollTop ```
var focusCurrentNode; focusCurrentNode = function() { var currentScrollTop; // WebKit strangeness - calling scrollIntoView() causes the entire page to scroll! currentScrollTop = $(window).scrollTop(); currentNode$[0].scrollIntoView(); return $(window).scrollTop(currentScrollTop); };
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
25
29
nevir/groc:lib/styles/default/behavior.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var focusCurrentNode; focusCurrentNode = function() { var currentScrollTop; // WebKit strangeness - calling scrollIntoView() causes the entire page to scroll! currentScrollTop = $(window).scrollTop(); currentNode$[0].scrollIntoView(); return $(window).sc...
focusCurrentNode = -> # WebKit strangeness - calling scrollIntoView() causes the entire page to scroll! currentScrollTop = $(window).scrollTop() currentNode$[0].scrollIntoView() $(window).scrollTop currentScrollTop
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
25
29
nevir/groc:lib/styles/default/behavior.coffee:3:completion
completion
focusCurrentNode = -> # WebKit strangeness - calling scrollIntoView() causes the entire page to scroll!
currentScrollTop = $(window).scrollTop() currentNode$[0].scrollIntoView() $(window).scrollTop currentScrollTop
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
25
29
nevir/groc:lib/styles/default/behavior.coffee:4:raw_corpus
raw_corpus
setCurrentNodeExpanded = (expanded) -> if expanded currentNode$.addClass 'expanded' else currentNode$.removeClass 'expanded' focusCurrentNode()
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
31
37
nevir/groc:lib/styles/default/behavior.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript setCurrentNodeExpanded = (expanded) -> if expanded currentNode$.addClass 'expanded' else currentNode$.removeClass 'expanded' focusCurrentNode() ```
var setCurrentNodeExpanded; setCurrentNodeExpanded = function(expanded) { if (expanded) { currentNode$.addClass('expanded'); } else { currentNode$.removeClass('expanded'); } return focusCurrentNode(); };
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
31
37
nevir/groc:lib/styles/default/behavior.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setCurrentNodeExpanded; setCurrentNodeExpanded = function(expanded) { if (expanded) { currentNode$.addClass('expanded'); } else { currentNode$.removeClass('expanded'); } return focusCurrentNode(); }; ```
setCurrentNodeExpanded = (expanded) -> if expanded currentNode$.addClass 'expanded' else currentNode$.removeClass 'expanded' focusCurrentNode()
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
31
37
nevir/groc:lib/styles/default/behavior.coffee:4:completion
completion
setCurrentNodeExpanded = (expanded) -> if expanded currentNode$.addClass 'expanded'
else currentNode$.removeClass 'expanded' focusCurrentNode()
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
31
37
nevir/groc:lib/styles/default/behavior.coffee:5:raw_corpus
raw_corpus
moveCurrentNode = (up) -> visibleNodes$ = toc$.find 'li:visible' # Fall back to the first node if anything goes wrong newIndex = 0 for node, i in visibleNodes$ if node == currentNode$[0] newIndex = if up then i - 1 else i + 1 newIndex = 0 if newIndex < 0 newIndex = visibleNodes$.length - ...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
39
62
nevir/groc:lib/styles/default/behavior.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript moveCurrentNode = (up) -> visibleNodes$ = toc$.find 'li:visible' # Fall back to the first node if anything goes wrong newIndex = 0 for node, i in visibleNodes$ if node == currentNode$[0] newIndex = if up then i - 1 else i + 1 newIndex = 0...
var moveCurrentNode; moveCurrentNode = function(up) { var currentNode$, i, j, len, newIndex, newNode$, node, visibleNodes$; visibleNodes$ = toc$.find('li:visible'); // Fall back to the first node if anything goes wrong newIndex = 0; for (i = j = 0, len = visibleNodes$.length; j < len; i = ++j) { node = v...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
39
62
nevir/groc:lib/styles/default/behavior.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var moveCurrentNode; moveCurrentNode = function(up) { var currentNode$, i, j, len, newIndex, newNode$, node, visibleNodes$; visibleNodes$ = toc$.find('li:visible'); // Fall back to the first node if anything goes wrong newIndex = 0; for (i = j = 0, len =...
moveCurrentNode = (up) -> visibleNodes$ = toc$.find 'li:visible' # Fall back to the first node if anything goes wrong newIndex = 0 for node, i in visibleNodes$ if node == currentNode$[0] newIndex = if up then i - 1 else i + 1 newIndex = 0 if newIndex < 0 newIndex = visibleNodes$.length - ...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
39
62
nevir/groc:lib/styles/default/behavior.coffee:5:completion
completion
moveCurrentNode = (up) -> visibleNodes$ = toc$.find 'li:visible' # Fall back to the first node if anything goes wrong newIndex = 0 for node, i in visibleNodes$ if node == currentNode$[0] newIndex = if up then i - 1 else i + 1 newIndex = 0 if newIndex < 0 newIndex = visibleNodes$.length - ...
newNode$ = $(visibleNodes$[newIndex]) # Remove first, in case it's the same node currentNode$.removeClass 'selected' newNode$.addClass 'selected' currentNode$ = newNode$ focusCurrentNode() # ## DOM Construction # # Navigation and the table of contents are entirely managed by us.
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
39
62
nevir/groc:lib/styles/default/behavior.coffee:8:raw_corpus
raw_corpus
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#{node.data.title}</span> </a> <span class...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
84
133
nevir/groc:lib/styles/default/behavior.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#...
var buildTOCNode; buildTOCNode = function(node, relativeRoot, parentFile) { var c, children$, discloser$, i, j, len, len1, node$, outline$, ref, ref1, ref2, ref3, ref4, ref5; node$ = $(`<li class="${node.type}"/>`); switch (node.type) { case 'file': node$.append(`<a class="label" href="${relativeRoot}$...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
84
133
nevir/groc:lib/styles/default/behavior.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildTOCNode; buildTOCNode = function(node, relativeRoot, parentFile) { var c, children$, discloser$, i, j, len, len1, node$, outline$, ref, ref1, ref2, ref3, ref4, ref5; node$ = $(`<li class="${node.type}"/>`); switch (node.type) { case 'file': ...
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#{node.data.title}</span> </a> <span class...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
84
133
nevir/groc:lib/styles/default/behavior.coffee:8:completion
completion
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html"> <span class="text">#{node.data.title}</span> </a> <span class...
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ discloser$ = $('<span class="discloser"/>').prependTo node$.find('> .label') discloser$.addClass 'placeholder' unless node.outlin...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
84
133
nevir/groc:lib/styles/default/behavior.coffee:9:raw_corpus
raw_corpus
currentNode$ = fileMap[documentPath].addClass 'selected expanded' currentNode$.parents('li').addClass 'expanded' # Set up the table of contents toggle toggle$ = nav$.find '.toggle' toggle$.click (evt) -> toggleTableOfContents() evt.preventDefault() evt.stopPropagation() # Prevent text selection...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
134
159
nevir/groc:lib/styles/default/behavior.coffee:9:completion
completion
currentNode$ = fileMap[documentPath].addClass 'selected expanded' currentNode$.parents('li').addClass 'expanded' # Set up the table of contents toggle toggle$ = nav$.find '.toggle' toggle$.click (evt) -> toggleTableOfContents() evt.preventDefault() evt.stopPropagation() # Prevent text selection...
evt.preventDefault() # Arrow keys navigate the table of contents whenever it is visible $('body').keydown (evt) -> if nav$.hasClass 'active' switch evt.keyCode when 37 then setCurrentNodeExpanded false # left when 38 then moveCurrentNode true # up when 39 then setCurrentNodeExpand...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
9b38ac3601e667fd245bbb1d57df7b20df7f2ab5
579
https://github.com/nevir/groc/blob/9b38ac3601e667fd245bbb1d57df7b20df7f2ab5/lib/styles/default/behavior.coffee
134
159
nevir/groc:lib/styles/default/behavior.coffee:1:raw_corpus
raw_corpus
buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li class="toggle">Table of Contents</li> <li class="search"><input id="search" type="searc...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
9
26
nevir/groc:lib/styles/default/behavior.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li class="toggle">Table of Contents</li> ...
var buildNav; buildNav = function(relativeRoot) { var i, len, nav$, node, tocRoot$; nav$ = $(`<nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li class="toggle">Table of Contents</li> <li class="sea...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
9
26
nevir/groc:lib/styles/default/behavior.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildNav; buildNav = function(relativeRoot) { var i, len, nav$, node, tocRoot$; nav$ = $(`<nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li c...
buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li class="toggle">Table of Contents</li> <li class="search"><input id="search" type="searc...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
9
26
nevir/groc:lib/styles/default/behavior.coffee:1:completion
completion
buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title="Project source on GitHub">Project source on GitHub</a></li> <li class="toggle">Table of Contents</li> <li class="search"><input id="search" type="searc...
</div> </nav> """).appendTo $('body') tocRoot$ = nav$.find '.toc' for node in tableOfContents tocRoot$.append buildTOCNode node, relativeRoot nav$
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
9
26
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</span> ...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
28
64
nevir/groc:lib/styles/default/behavior.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> ...
var buildTOCNode; buildTOCNode = function(node, relativeRoot, parentFile) { var c, children$, discloser$, i, j, len, len1, node$, outline$, ref, ref1, ref2, ref3, ref4, ref5; node$ = $(`<li class="${node.type}"/>`); switch (node.type) { case 'file': node$.append(`<a class="label" href="${relativeRoot}$...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
28
64
nevir/groc:lib/styles/default/behavior.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildTOCNode; buildTOCNode = function(node, relativeRoot, parentFile) { var c, children$, discloser$, i, j, len, len1, node$, outline$, ref, ref1, ref2, ref3, ref4, ref5; node$ = $(`<li class="${node.type}"/>`); switch (node.type) { case 'file': ...
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</span> ...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
28
64
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</span> ...
if node.outline?.length > 0 outline$ = $('<ol class="outline"/>') outline$.append buildTOCNode c, relativeRoot, node for c in node.outline node$.append outline$ if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
28
64
nevir/groc:lib/styles/default/behavior.coffee:3:raw_corpus
raw_corpus
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') nav$ = buildNav relativeRoot toggle$ = nav$.find '.toggle' toggle$.click (evt) -> nav$.toggleClass 'active' $('html').toggleClass 'pop...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
66
83
nevir/groc:lib/styles/default/behavior.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') nav$ = buildNav relativeRoot toggle$ = nav$.find '.toggle' toggle$.click (evt) -> ...
var buildOutlineNode; buildOutlineNode = function(node, file, relativeRoot) { var node$; return node$ = $(`<li class="${node.type}"/>`); }; $(function() { var nav$, relativeRoot, toggle$; relativeRoot = $('meta[name="groc-relative-root"]').attr('content'); nav$ = buildNav(relativeRoot); toggle$ = nav$.fin...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
66
83
nevir/groc:lib/styles/default/behavior.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildOutlineNode; buildOutlineNode = function(node, file, relativeRoot) { var node$; return node$ = $(`<li class="${node.type}"/>`); }; $(function() { var nav$, relativeRoot, toggle$; relativeRoot = $('meta[name="groc-relative-root"]').attr('content')...
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') nav$ = buildNav relativeRoot toggle$ = nav$.find '.toggle' toggle$.click (evt) -> nav$.toggleClass 'active' $('html').toggleClass 'pop...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
66
83
nevir/groc:lib/styles/default/behavior.coffee:3:completion
completion
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') nav$ = buildNav relativeRoot toggle$ = nav$.find '.toggle' toggle$.click (evt) ->
nav$.toggleClass 'active' $('html').toggleClass 'popped' evt.preventDefault() evt.stopPropagation() # Prevent text selection toggle$.mousedown (evt) -> evt.preventDefault()
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
ce8fb3472f9c9692dd7a7592657d90136220f6a1
579
https://github.com/nevir/groc/blob/ce8fb3472f9c9692dd7a7592657d90136220f6a1/lib/styles/default/behavior.coffee
66
83
nevir/groc:lib/styles/default/behavior.coffee:1:raw_corpus
raw_corpus
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e922a6490773a8adbf2069b96ef8f0f3fe516d01
579
https://github.com/nevir/groc/blob/e922a6490773a8adbf2069b96ef8f0f3fe516d01/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:1:completion
completion
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title...
nav$ buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</s...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e922a6490773a8adbf2069b96ef8f0f3fe516d01
579
https://github.com/nevir/groc/blob/e922a6490773a8adbf2069b96ef8f0f3fe516d01/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e922a6490773a8adbf2069b96ef8f0f3fe516d01
579
https://github.com/nevir/groc/blob/e922a6490773a8adbf2069b96ef8f0f3fe516d01/lib/styles/default/behavior.coffee
51
77
nevir/groc:lib/styles/default/behavior.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li...
var buildOutlineNode, c, children$, i, len, ref, ref1; if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('<ol class="children"/>'); ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { c = ref1[i]; children$.append(buildTOCNode(c, relativeRoot, parentFile)); ...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e922a6490773a8adbf2069b96ef8f0f3fe516d01
579
https://github.com/nevir/groc/blob/e922a6490773a8adbf2069b96ef8f0f3fe516d01/lib/styles/default/behavior.coffee
51
77
nevir/groc:lib/styles/default/behavior.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildOutlineNode, c, children$, i, len, ref, ref1; if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('<ol class="children"/>'); ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { c = ref1[i]; childre...
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e922a6490773a8adbf2069b96ef8f0f3fe516d01
579
https://github.com/nevir/groc/blob/e922a6490773a8adbf2069b96ef8f0f3fe516d01/lib/styles/default/behavior.coffee
51
77
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
nav$ = buildNav relativeRoot toggle$ = nav$.find '.toggle' toggle$.click (evt) -> nav$.toggleClass 'expanded' $('html').toggleClass 'popped' evt.preventDefault() evt.stopPropagation() # Prevent text selection toggle$.mousedown (evt) -> evt.preventDefault()
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e922a6490773a8adbf2069b96ef8f0f3fe516d01
579
https://github.com/nevir/groc/blob/e922a6490773a8adbf2069b96ef8f0f3fe516d01/lib/styles/default/behavior.coffee
51
77
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e3956d85ee50dda48a60e3c4d93c662c65e15783
579
https://github.com/nevir/groc/blob/e3956d85ee50dda48a60e3c4d93c662c65e15783/lib/styles/default/behavior.coffee
51
72
nevir/groc:lib/styles/default/behavior.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li...
var buildOutlineNode, c, children$, i, len, ref, ref1; if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('<ol class="children"/>'); ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { c = ref1[i]; children$.append(buildTOCNode(c, relativeRoot, parentFile)); ...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e3956d85ee50dda48a60e3c4d93c662c65e15783
579
https://github.com/nevir/groc/blob/e3956d85ee50dda48a60e3c4d93c662c65e15783/lib/styles/default/behavior.coffee
51
72
nevir/groc:lib/styles/default/behavior.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildOutlineNode, c, children$, i, len, ref, ref1; if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('<ol class="children"/>'); ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { c = ref1[i]; childre...
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e3956d85ee50dda48a60e3c4d93c662c65e15783
579
https://github.com/nevir/groc/blob/e3956d85ee50dda48a60e3c4d93c662c65e15783/lib/styles/default/behavior.coffee
51
72
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""")
$ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') nav$ = buildNav relativeRoot nav$.find('.toggle').click (evt) -> nav$.toggleClass 'expanded' $('html').toggleClass 'popped' evt.preventDefault() evt.stopPropagation()
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e3956d85ee50dda48a60e3c4d93c662c65e15783
579
https://github.com/nevir/groc/blob/e3956d85ee50dda48a60e3c4d93c662c65e15783/lib/styles/default/behavior.coffee
51
72
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
2394dcdc4ba60ff966c8d985fc2993e3119e3a00
579
https://github.com/nevir/groc/blob/2394dcdc4ba60ff966c8d985fc2993e3119e3a00/lib/styles/default/behavior.coffee
51
67
nevir/groc:lib/styles/default/behavior.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li...
var buildOutlineNode, c, children$, i, len, ref, ref1; if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('<ol class="children"/>'); ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { c = ref1[i]; children$.append(buildTOCNode(c, relativeRoot, parentFile)); ...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
2394dcdc4ba60ff966c8d985fc2993e3119e3a00
579
https://github.com/nevir/groc/blob/2394dcdc4ba60ff966c8d985fc2993e3119e3a00/lib/styles/default/behavior.coffee
51
67
nevir/groc:lib/styles/default/behavior.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var buildOutlineNode, c, children$, i, len, ref, ref1; if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('<ol class="children"/>'); ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { c = ref1[i]; childre...
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('met...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
2394dcdc4ba60ff966c8d985fc2993e3119e3a00
579
https://github.com/nevir/groc/blob/2394dcdc4ba60ff966c8d985fc2993e3119e3a00/lib/styles/default/behavior.coffee
51
67
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
if node.children?.length > 0 children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') nav$ = buildNav relativeRoot nav$.click -> nav$.toggleClass 'expanded'
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
2394dcdc4ba60ff966c8d985fc2993e3119e3a00
579
https://github.com/nevir/groc/blob/2394dcdc4ba60ff966c8d985fc2993e3119e3a00/lib/styles/default/behavior.coffee
51
67
nevir/groc:lib/styles/default/behavior.coffee:1:raw_corpus
raw_corpus
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4f8226ab892abdfb28634f0951c1f9539c028a0a
579
https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:1:completion
completion
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/groc" title...
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</span> ...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4f8226ab892abdfb28634f0951c1f9539c028a0a
579
https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').at...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4f8226ab892abdfb28634f0951c1f9539c028a0a
579
https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/styles/default/behavior.coffee
51
63
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="groc-relative-root"]').attr('content') buildNav relativeRoot
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
4f8226ab892abdfb28634f0951c1f9539c028a0a
579
https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/styles/default/behavior.coffee
51
63
nevir/groc:lib/styles/default/behavior.coffee:1:raw_corpus
raw_corpus
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/lidoc" titl...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
8e847e1adf83ec4794493091970f3360e0ad6735
579
https://github.com/nevir/groc/blob/8e847e1adf83ec4794493091970f3360e0ad6735/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:1:completion
completion
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="github"><a href="https://github.com/nevir/lidoc" titl...
buildTOCNode = (node, relativeRoot, parentFile) -> node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</span> ...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
8e847e1adf83ec4794493091970f3360e0ad6735
579
https://github.com/nevir/groc/blob/8e847e1adf83ec4794493091970f3360e0ad6735/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="lidoc-relative-root"]').a...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
8e847e1adf83ec4794493091970f3360e0ad6735
579
https://github.com/nevir/groc/blob/8e847e1adf83ec4794493091970f3360e0ad6735/lib/styles/default/behavior.coffee
51
63
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
children$ = $('<ol class="children"/>') children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="lidoc-relative-root"]').attr('content') buildNav relativeRoot
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
8e847e1adf83ec4794493091970f3360e0ad6735
579
https://github.com/nevir/groc/blob/8e847e1adf83ec4794493091970f3360e0ad6735/lib/styles/default/behavior.coffee
51
63
nevir/groc:lib/styles/default/behavior.coffee:1:raw_corpus
raw_corpus
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="toggle">Table of Contents</li> <li class="sea...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e2d2229cac05e6ef5625b636587ca61e21edc288
579
https://github.com/nevir/groc/blob/e2d2229cac05e6ef5625b636587ca61e21edc288/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:1:completion
completion
tableOfContents = <%= JSON.stringify(tableOfContents) %> # # Page Behavior # ## DOM Construction # # Navigation and the table of contents are entirely managed by us. buildNav = (relativeRoot) -> nav$ = $(""" <nav> <ul class="tools"> <li class="toggle">Table of Contents</li> <li class="sea...
node$ = $("""<li class="#{node.type}"/>""") switch node.type when 'file' node$.append """ <a class="label" href="#{relativeRoot}#{node.data.targetPath}.html">#{node.data.title}</a> <span class="file-path">#{node.data.projectPath}</span> """ when 'folder' node$.append """<sp...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e2d2229cac05e6ef5625b636587ca61e21edc288
579
https://github.com/nevir/groc/blob/e2d2229cac05e6ef5625b636587ca61e21edc288/lib/styles/default/behavior.coffee
1
50
nevir/groc:lib/styles/default/behavior.coffee:2:raw_corpus
raw_corpus
children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$ buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="lidoc-relative-root"]').attr('content') buildNav relativeRoot
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e2d2229cac05e6ef5625b636587ca61e21edc288
579
https://github.com/nevir/groc/blob/e2d2229cac05e6ef5625b636587ca61e21edc288/lib/styles/default/behavior.coffee
51
62
nevir/groc:lib/styles/default/behavior.coffee:2:completion
completion
children$.append buildTOCNode c, relativeRoot, parentFile for c in node.children node$.append children$ node$
buildOutlineNode = (node, file, relativeRoot) -> node$ = $("""<li class="#{node.type}"/>""") $ -> relativeRoot = $('meta[name="lidoc-relative-root"]').attr('content') buildNav relativeRoot
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
e2d2229cac05e6ef5625b636587ca61e21edc288
579
https://github.com/nevir/groc/blob/e2d2229cac05e6ef5625b636587ca61e21edc288/lib/styles/default/behavior.coffee
51
62
nevir/groc:lib/styles/default/behavior.coffee:6:raw_corpus
raw_corpus
appendHeaderNodes = (target$, filePath, nodeList) -> return unless nodeList.length > 0 targetList$ = $('<ol/>').appendTo target$ for node in nodeList node$ = $(""" <li class="header"> <a href="#{filePath}##{node.header.slug}">#{node.header.title}</a> </li> """).appendTo targetList$ ...
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
793acc68fc39f84ff6dd75c2d45cc8701503e169
579
https://github.com/nevir/groc/blob/793acc68fc39f84ff6dd75c2d45cc8701503e169/lib/styles/default/behavior.coffee
97
135
nevir/groc:lib/styles/default/behavior.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript appendHeaderNodes = (target$, filePath, nodeList) -> return unless nodeList.length > 0 targetList$ = $('<ol/>').appendTo target$ for node in nodeList node$ = $(""" <li class="header"> <a href="#{filePath}##{node.header.slug}">#{node.head...
var appendHeaderNodes; appendHeaderNodes = function(target$, filePath, nodeList) { var i, len, node, node$, results, targetList$; if (!(nodeList.length > 0)) { return; } targetList$ = $('<ol/>').appendTo(target$); results = []; for (i = 0, len = nodeList.length; i < len; i++) { node = nodeList[i]; ...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
793acc68fc39f84ff6dd75c2d45cc8701503e169
579
https://github.com/nevir/groc/blob/793acc68fc39f84ff6dd75c2d45cc8701503e169/lib/styles/default/behavior.coffee
97
135
nevir/groc:lib/styles/default/behavior.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var appendHeaderNodes; appendHeaderNodes = function(target$, filePath, nodeList) { var i, len, node, node$, results, targetList$; if (!(nodeList.length > 0)) { return; } targetList$ = $('<ol/>').appendTo(target$); results = []; for (i = 0, len = no...
appendHeaderNodes = (target$, filePath, nodeList) -> return unless nodeList.length > 0 targetList$ = $('<ol/>').appendTo target$ for node in nodeList node$ = $(""" <li class="header"> <a href="#{filePath}##{node.header.slug}">#{node.header.title}</a> </li> """).appendTo targetList$ ...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
793acc68fc39f84ff6dd75c2d45cc8701503e169
579
https://github.com/nevir/groc/blob/793acc68fc39f84ff6dd75c2d45cc8701503e169/lib/styles/default/behavior.coffee
97
135
nevir/groc:lib/styles/default/behavior.coffee:6:completion
completion
appendHeaderNodes = (target$, filePath, nodeList) -> return unless nodeList.length > 0 targetList$ = $('<ol/>').appendTo target$ for node in nodeList node$ = $(""" <li class="header"> <a href="#{filePath}##{node.header.slug}">#{node.header.title}</a> </li> """).appendTo targetList$ ...
search$ = $('#search') search$.bind 'keyup search', (evt) => searchNodes search$.val() search$.keydown (evt) => if evt.keyCode == 27 # Esc if search$.val().trim() == '' search$.blur() else search$.val '' search$.focus (evt) => nav$.addClass 'active' search$.blur (evt) => n...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/behavior.coffee
MIT
793acc68fc39f84ff6dd75c2d45cc8701503e169
579
https://github.com/nevir/groc/blob/793acc68fc39f84ff6dd75c2d45cc8701503e169/lib/styles/default/behavior.coffee
97
135
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else (if @length > 0 then @[0].textContent else '') $$.fn.html = (value) -> type = $$.toType(value) if type is "undefined" (if @leng...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
83b62adffb2fe5df52bf44fdf51256c3c3997aec
2,055
https://github.com/soyjavi/QuoJS/blob/83b62adffb2fe5df52bf44fdf51256c3c3997aec/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else (if @length > 0 then @[0].textContent else '') $$.fn.html = (value) -> type = $$.toType(va...
(function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { if (this.length > 0) { return this[0].textContent; } else { return ''; } } }; $...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
83b62adffb2fe5df52bf44fdf51256c3c3997aec
2,055
https://github.com/soyjavi/QuoJS/blob/83b62adffb2fe5df52bf44fdf51256c3c3997aec/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { if (this.length > 0) { return this[0].textContent; ...
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else (if @length > 0 then @[0].textContent else '') $$.fn.html = (value) -> type = $$.toType(value) if type is "undefined" (if @leng...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
83b62adffb2fe5df52bf44fdf51256c3c3997aec
2,055
https://github.com/soyjavi/QuoJS/blob/83b62adffb2fe5df52bf44fdf51256c3c3997aec/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else (if @length > 0 then @[0].textContent else '') $$.fn.html = (value) -> type = $$.toType(value) if type is "undefined" (if @leng...
if type is "string" @insertAdjacentHTML "beforeend", value else if type is "array" value.forEach (v) => $$(@).append(v) else @appendChild value $$.fn.prepend = (value) -> type = $$.toType(value) @each -> if type is ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
83b62adffb2fe5df52bf44fdf51256c3c3997aec
2,055
https://github.com/soyjavi/QuoJS/blob/83b62adffb2fe5df52bf44fdf51256c3c3997aec/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:2:raw_corpus
raw_corpus
else @parentNode.insertBefore value, @ @remove() $$.fn.empty = () -> @each -> @innerHTML = null
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
83b62adffb2fe5df52bf44fdf51256c3c3997aec
2,055
https://github.com/soyjavi/QuoJS/blob/83b62adffb2fe5df52bf44fdf51256c3c3997aec/src/quo.output.coffee
51
56
soyjavi/QuoJS:src/quo.output.coffee:2:completion
completion
else @parentNode.insertBefore value, @ @remove()
$$.fn.empty = () -> @each -> @innerHTML = null
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
83b62adffb2fe5df52bf44fdf51256c3c3997aec
2,055
https://github.com/soyjavi/QuoJS/blob/83b62adffb2fe5df52bf44fdf51256c3c3997aec/src/quo.output.coffee
51
56
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if type is "undefined" @[0].innerHTML else ...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a
2,055
https://github.com/soyjavi/QuoJS/blob/2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if type is "undef...
(function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = function(value) { var type; type = $$.toType(value); ...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a
2,055
https://github.com/soyjavi/QuoJS/blob/2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = functi...
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if type is "undefined" @[0].innerHTML else ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a
2,055
https://github.com/soyjavi/QuoJS/blob/2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if type is "undefined" @[0].innerHTML else ...
if type is "string" @insertAdjacentHTML "beforeend", value else if type is "array" value.forEach (v) => $$(@).append(v) else @appendChild value $$.fn.prepend = (value) -> type = $$.toType(value) @each -> if type is ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a
2,055
https://github.com/soyjavi/QuoJS/blob/2cc8509bc5577deb57c0b3ba8c2a309c23b19a6a/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
4a464ac3313a4c944f051a3ca974813c7db6627c
2,055
https://github.com/soyjavi/QuoJS/blob/4a464ac3313a4c944f051a3ca974813c7db6627c/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type ...
(function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = function(value) { var type; type = $$.toType(value); ...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
4a464ac3313a4c944f051a3ca974813c7db6627c
2,055
https://github.com/soyjavi/QuoJS/blob/4a464ac3313a4c944f051a3ca974813c7db6627c/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = functi...
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
4a464ac3313a4c944f051a3ca974813c7db6627c
2,055
https://github.com/soyjavi/QuoJS/blob/4a464ac3313a4c944f051a3ca974813c7db6627c/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
@insertAdjacentHTML "beforeend", value else if type is "array" value.each (index, value) => @appendChild value else @appendChild value $$.fn.prepend = (value) -> type = $$.toType(value) @each -> if type is "string" ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
4a464ac3313a4c944f051a3ca974813c7db6627c
2,055
https://github.com/soyjavi/QuoJS/blob/4a464ac3313a4c944f051a3ca974813c7db6627c/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:2:raw_corpus
raw_corpus
@parentNode.insertBefore value, @ @remove() $$.fn.empty = () -> @each -> @innerHTML = null
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
4a464ac3313a4c944f051a3ca974813c7db6627c
2,055
https://github.com/soyjavi/QuoJS/blob/4a464ac3313a4c944f051a3ca974813c7db6627c/src/quo.output.coffee
51
55
soyjavi/QuoJS:src/quo.output.coffee:2:completion
completion
@parentNode.insertBefore value, @ @remove()
$$.fn.empty = () -> @each -> @innerHTML = null
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
4a464ac3313a4c944f051a3ca974813c7db6627c
2,055
https://github.com/soyjavi/QuoJS/blob/4a464ac3313a4c944f051a3ca974813c7db6627c/src/quo.output.coffee
51
55
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
025026647aafa92b6769d0d7fa1eaf25f0963fc9
2,055
https://github.com/soyjavi/QuoJS/blob/025026647aafa92b6769d0d7fa1eaf25f0963fc9/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type ...
(function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = function(value) { var type; type = $$.toType(value); ...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
025026647aafa92b6769d0d7fa1eaf25f0963fc9
2,055
https://github.com/soyjavi/QuoJS/blob/025026647aafa92b6769d0d7fa1eaf25f0963fc9/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = functi...
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
025026647aafa92b6769d0d7fa1eaf25f0963fc9
2,055
https://github.com/soyjavi/QuoJS/blob/025026647aafa92b6769d0d7fa1eaf25f0963fc9/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
else if type is "array" value.each (index, value) => @appendChild value else @appendChild value $$.fn.prepend = (value) -> type = $$.toType(value) @each -> if type is "string" @insertAdjacentHTML "afterbegin", value ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
025026647aafa92b6769d0d7fa1eaf25f0963fc9
2,055
https://github.com/soyjavi/QuoJS/blob/025026647aafa92b6769d0d7fa1eaf25f0963fc9/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:2:raw_corpus
raw_corpus
@remove() $$.fn.empty = () -> @each -> @innerHTML = null
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
025026647aafa92b6769d0d7fa1eaf25f0963fc9
2,055
https://github.com/soyjavi/QuoJS/blob/025026647aafa92b6769d0d7fa1eaf25f0963fc9/src/quo.output.coffee
51
54
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
62634c29032c683d4f4bcfa365013e112f051c89
2,055
https://github.com/soyjavi/QuoJS/blob/62634c29032c683d4f4bcfa365013e112f051c89/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type ...
(function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = function(value) { var type; type = $$.toType(value); ...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
62634c29032c683d4f4bcfa365013e112f051c89
2,055
https://github.com/soyjavi/QuoJS/blob/62634c29032c683d4f4bcfa365013e112f051c89/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function($$) { $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = functi...
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
62634c29032c683d4f4bcfa365013e112f051c89
2,055
https://github.com/soyjavi/QuoJS/blob/62634c29032c683d4f4bcfa365013e112f051c89/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
else if type is "array" value.each (index, value) => @appendChild value.cloneNode(true) else @appendChild value.cloneNode(true) $$.fn.prepend = (value) -> type = $$.toType(value) @each -> if type is "string" @insertAdjacentHTML...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
62634c29032c683d4f4bcfa365013e112f051c89
2,055
https://github.com/soyjavi/QuoJS/blob/62634c29032c683d4f4bcfa365013e112f051c89/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
16ffe8834cfcfd1fac35a01223a91bdc7eaadd33
2,055
https://github.com/soyjavi/QuoJS/blob/16ffe8834cfcfd1fac35a01223a91bdc7eaadd33/src/quo.output.coffee
1
49
soyjavi/QuoJS:src/quo.output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type ...
(function($$) { var _prependElement; $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }; $$.fn.html = function(value) { var type; ty...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
16ffe8834cfcfd1fac35a01223a91bdc7eaadd33
2,055
https://github.com/soyjavi/QuoJS/blob/16ffe8834cfcfd1fac35a01223a91bdc7eaadd33/src/quo.output.coffee
1
49
soyjavi/QuoJS:src/quo.output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function($$) { var _prependElement; $$.fn.text = function(value) { if (value || $$.toType(value) === "number") { return this.each(function() { return this.textContent = value; }); } else { return this[0].textContent; } }...
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
16ffe8834cfcfd1fac35a01223a91bdc7eaadd33
2,055
https://github.com/soyjavi/QuoJS/blob/16ffe8834cfcfd1fac35a01223a91bdc7eaadd33/src/quo.output.coffee
1
49
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
do ($$ = Quo) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(value) if value or type is "number" or type is "string" @each -> ...
@insertAdjacentHTML "beforeend", value else if type is "array" value.each (index, value) => @appendChild value else @appendChild value $$.fn.prepend = (value) -> type = $$.toType(value) @each -> _prependElement @, value, type $$.fn.replac...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
16ffe8834cfcfd1fac35a01223a91bdc7eaadd33
2,055
https://github.com/soyjavi/QuoJS/blob/16ffe8834cfcfd1fac35a01223a91bdc7eaadd33/src/quo.output.coffee
1
49
soyjavi/QuoJS:src/quo.output.coffee:1:raw_corpus
raw_corpus
### QuoJS 2.2.1 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($$) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(v...
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
ad123823d608843b57cd0f95305bbaa109ddde97
2,055
https://github.com/soyjavi/QuoJS/blob/ad123823d608843b57cd0f95305bbaa109ddde97/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:1:completion
completion
### QuoJS 2.2.1 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($$) -> $$.fn.text = (value) -> if value or $$.toType(value) is "number" @each -> @textContent = value else @[0].textContent $$.fn.html = (value) -> type = $$.toType(v...
$$.fn.append = (value) -> @each -> if $$.toType(value) is "string" if value @appendChild _createElement(value) else @insertBefore value $$.fn.prepend = (value) -> @each -> if $$.toType(value) is "string" ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
ad123823d608843b57cd0f95305bbaa109ddde97
2,055
https://github.com/soyjavi/QuoJS/blob/ad123823d608843b57cd0f95305bbaa109ddde97/src/quo.output.coffee
1
50
soyjavi/QuoJS:src/quo.output.coffee:2:raw_corpus
raw_corpus
$$.fn.empty = () -> @each -> @innerHTML = null return _createElement = (content) -> div = document.createElement("div") div.innerHTML = content # div.firstChild div return ) Quo
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
ad123823d608843b57cd0f95305bbaa109ddde97
2,055
https://github.com/soyjavi/QuoJS/blob/ad123823d608843b57cd0f95305bbaa109ddde97/src/quo.output.coffee
51
64
soyjavi/QuoJS:src/quo.output.coffee:2:completion
completion
$$.fn.empty = () -> @each -> @innerHTML = null return _createElement = (content) ->
div = document.createElement("div") div.innerHTML = content # div.firstChild div return ) Quo
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.output.coffee
MIT
ad123823d608843b57cd0f95305bbaa109ddde97
2,055
https://github.com/soyjavi/QuoJS/blob/ad123823d608843b57cd0f95305bbaa109ddde97/src/quo.output.coffee
51
64