Created
April 8, 2009 01:03
-
-
Save satyr/91565 to your computer and use it in GitHub Desktop.
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
chrome/content/about.js 118 | |
for (name in info.commands) | |
chrome/content/popupmenu.js 67 | |
for (i in results) { | |
chrome/content/report-bug.js 106 | |
for (name in info) | |
chrome/content/skinlist.js 50 | |
for( i in skinList){ | |
chrome/content/skinlist.js 94 | |
for(x in lines){ | |
feed-parts/footer/final.js 47 | |
for (name in this) | |
feed-parts/footer/final.js 57 | |
for (i = 0; i < funcs.length; i++) | |
feed-parts/header/cmdutils.js 630 | |
for each(login in logins) { | |
feed-parts/header/cmdutils.js 660 | |
for each(login in logins){ | |
feed-parts/header/cmdutils.js 806 | |
for (label in options.modifiers) { | |
feed-parts/header/cmdutils.js 906 | |
for (key in options) { | |
feed-parts/header/cmdutils.js 1132 | |
for (data in options.postData) | |
feed-parts/header/cmdutils.js 1169 | |
for (data in options.postData) | |
feed-parts/header/cmdutils.js 1192 | |
for (p in path) { | |
feed-parts/header/cmdutils.js 1195 | |
for (d in data) { | |
feed-parts/header/cmdutils.js 1265 | |
for (result in results) { | |
feed-parts/header/en/nountypes.js 363 | |
for( x in noun_type_address.knownAddresses) { | |
modules/annotation_memory.js 143 | |
for (uri in ann) | |
modules/codesource.js 60 | |
for (headerCs in headerSources) { | |
modules/codesource.js 70 | |
for (footerCs in footerSources) { | |
modules/default_feed_plugin.js 250 | |
for (objName in sandbox) { | |
modules/feedaggregator.js 118 | |
for (name in feed.commands) { | |
modules/feedmanager.js 324 | |
for (name in this._plugins) { | |
modules/feedmanager.js 337 | |
for (url in this._feeds) | |
modules/locked_down_feed_plugin.js 221 | |
for (modLabel in modifiers) { | |
modules/locked_down_feed_plugin.js 517 | |
for (propName in schema) { | |
modules/parser/locale_en.js 57 | |
for(name in unfilledArgs) { | |
modules/parser/locale_en.js 83 | |
for (argName in unfilledArgs) { | |
modules/parser/parser.js 226 | |
for each(verb in verbsToTry) { | |
modules/parser/parser.js 302 | |
for each(part in newSuggs) { | |
modules/parser/parser.js 324 | |
for (x in commandList) ]; | |
modules/parser/parser.js 702 | |
for each ( pronoun in this._parserPlugin.PRONOUNS ) { | |
modules/parser/tng/parser.js 59 | |
for (verb in verbs) { | |
modules/parser/tng/parser.js 61 | |
for (name in names(verbs[verb])) { | |
modules/parser/tng/parser.js 73 | |
for (verb in verbs) { | |
modules/parser/tng/parser.js 75 | |
for (name in names(verbs[verb])) { | |
modules/parser/tng/parser.js 447 | |
for each (parse in this._possibleParses) { | |
modules/parser/tng/setup.js 29 | |
for each (pair in this._verbArgPairs) { | |
modules/parser/tng/setup.js 102 | |
for each (role in window[this.currentLang].roles) { | |
modules/parser/tng/setup.js 112 | |
for (verb in verbs) { | |
modules/parser/tng/setup.js 115 | |
for each (arg in verbs[verb].arguments) | |
modules/parser/tng/utils.js 43 | |
for each (verb in verbs) { | |
modules/parser/tng/utils.js 44 | |
for each (name in (verb.names[demoParserInterface.currentLang] || verb.names.en)) { | |
modules/parser/tng/utils.js 51 | |
for each (name in (verb.names[demoParserInterface.currentLang] || verb.names.en)) { | |
modules/python_feed_endpoint.js 40 | |
for (uri in Endpoint.__registryCallbacks) | |
modules/sandboxfactory.js 109 | |
for (symbolName in globals) { | |
modules/skinsvc.js 288 | |
for each( skin in skinList){ | |
modules/utils.js 224 | |
for(timerID in Utils.__timerData.timers) { | |
modules/utils.js 402 | |
for (key in params) { | |
modules/utils.js 426 | |
for (param in paramList) { | |
modules/utils.js 556 | |
for (i in hash)].join(""); | |
scripts/codemirror/js/editor.js 415 | |
for (cursor = pos.node; cursor; cursor = cursor.previousSibling) | |
scripts/codemirror/js/editor.js 433 | |
for (pos = h.nodeAfter(start.node); pos != end.node; pos = h.nodeAfter(pos)) | |
scripts/jquery.js 184 | |
for ( name in options ) | |
scripts/jquery.js 676 | |
for ( name in object ) | |
scripts/jquery.js 687 | |
for ( name in object ) | |
scripts/jquery.js 1316 | |
for ( name in jQuery.cache[ id ] ) | |
scripts/jquery.js 1985 | |
for ( node = parent.firstChild; node; node = node.nextSibling ) { | |
scripts/jquery.js 2564 | |
for ( ret in events[type] ) break; | |
scripts/jquery.js 2580 | |
for ( ret in events ) break; | |
scripts/jquery.js 3874 | |
for ( p in prop ) { | |
scripts/jquery.js 4228 | |
for ( prop in rules ) container.style[prop] = rules[prop]; | |
scripts/pixastic.js 101 | |
for (i = 0, j = 0; i < elsLen; i++) { | |
scripts/wikicreole.js 42 | |
for (i in this.options) { | |
standard-feeds/email.js 90 | |
for( domain in domains){ | |
standard-feeds/general.js 65 | |
for(i=0; i<words.length; i++){ | |
standard-feeds/general.js 238 | |
for(c = v[0], i = 0, l = p.length; l--; c = f[p[i]](c, v[++i])); | |
standard-feeds/general.js 245 | |
for(a = c; v.indexOf(c = e.charAt(++i)) < 0; a += c); f.push((--i, a)); | |
standard-feeds/social.js 418 | |
for (k in data) if (data[k]) | |
tests/framework.js 49 | |
for (name in obj) { | |
tests/framework.js 258 | |
for (prop in parent) | |
tests/framework.js 275 | |
for each (test in tests) { | |
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
#!ruby | |
re = /^(\s*for(?:\s+each)?\s*\((?!\s*\b(?:var|let)\b))\s*(?=\w+)/ | |
list = %w{chrome/content/about.js 118 | |
chrome/content/popupmenu.js 67 | |
chrome/content/report-bug.js 106 | |
chrome/content/skinlist.js 50 | |
chrome/content/skinlist.js 94 | |
feed-parts/footer/final.js 47 | |
feed-parts/footer/final.js 57 | |
feed-parts/header/cmdutils.js 630 | |
feed-parts/header/cmdutils.js 660 | |
feed-parts/header/cmdutils.js 806 | |
feed-parts/header/cmdutils.js 906 | |
feed-parts/header/cmdutils.js 1132 | |
feed-parts/header/cmdutils.js 1169 | |
feed-parts/header/cmdutils.js 1192 | |
feed-parts/header/cmdutils.js 1195 | |
feed-parts/header/cmdutils.js 1265 | |
feed-parts/header/en/nountypes.js 363 | |
modules/annotation_memory.js 143 | |
modules/codesource.js 60 | |
modules/codesource.js 70 | |
modules/default_feed_plugin.js 250 | |
modules/feedaggregator.js 118 | |
modules/feedmanager.js 324 | |
modules/feedmanager.js 337 | |
modules/locked_down_feed_plugin.js 221 | |
modules/locked_down_feed_plugin.js 517 | |
modules/parser/locale_en.js 57 | |
modules/parser/locale_en.js 83 | |
modules/parser/parser.js 226 | |
modules/parser/parser.js 302 | |
modules/parser/parser.js 702 | |
modules/parser/tng/parser.js 59 | |
modules/parser/tng/parser.js 61 | |
modules/parser/tng/parser.js 73 | |
modules/parser/tng/parser.js 75 | |
modules/parser/tng/parser.js 447 | |
modules/parser/tng/setup.js 29 | |
modules/parser/tng/setup.js 102 | |
modules/parser/tng/setup.js 112 | |
modules/parser/tng/setup.js 115 | |
modules/parser/tng/utils.js 43 | |
modules/parser/tng/utils.js 44 | |
modules/parser/tng/utils.js 51 | |
modules/python_feed_endpoint.js 40 | |
modules/sandboxfactory.js 109 | |
modules/skinsvc.js 288 | |
modules/utils.js 224 | |
modules/utils.js 402 | |
modules/utils.js 426 | |
standard-feeds/email.js 90 | |
standard-feeds/general.js 65 | |
tests/framework.js 49 | |
tests/framework.js 258 | |
tests/framework.js 275} | |
dict = list.each_slice(2).reduce({}) do |h, (n, l)| | |
(h[n] ||= []) << l.to_i | |
h | |
end | |
dict.each do |name, targets| | |
ls = IO.read(name).force_encoding('utf-8').lines.to_a | |
ls.each_with_index do |line, i| | |
puts line.gsub! re, '\1var ' if targets.index i + 1 | |
end | |
File.open(name, 'wb'){|file| ls.each{|l| file << l } } | |
puts "#{name} #{targets * ?,}" | |
end |
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
#!ruby | |
re = /^\s*for(?:\s+each)?\s*\((?!\s*(?:var|let))\s*\w+/ | |
Dir.glob('**/*.js').each do |name| | |
IO.read(name).force_encoding('utf-8').lines.with_index do |line, i| | |
print "#{name} #{i + 1}\n#{line}\n" if line =~ re | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment