bgrins / devtools-snippets

A collection of helpful snippets to use inside of browser devtools
http://bgrins.github.io/devtools-snippets/
2.96k stars 370 forks source link

Squashed commit of the following: Fix issue35 #44

Closed anaran closed 10 years ago

anaran commented 10 years ago

commit e0ebe3182f7c4558c706312af9725337e05fecc4 Author: Adrian Aichner adrian.aichner@gmail.com Date: Thu Nov 28 00:00:12 2013 +0100

Partial documentation update, snippet import export improvements.

Change export format to parsed scriptSnippets form (like snippets.json).
Provide detailed error reporting on parsable, but invalid JSON import file.
Hide missingFileTypeExtensionSelect when exportTypeSelect.value === singleFile.innerText
Add initial section of README.md to devtools_import_export.js
as entry point for new users.

Add supporting images.

commit c17a865c426468bb95fbe52cd875c8cd04aaf282 Author: Adrian Aichner adrian.aichner@gmail.com Date: Tue Nov 26 12:34:33 2013 +0100

Add Close link temporarily as workaround for chrome canary crash.

See https://code.google.com/p/chromium/issues/detail?id=323031

commit 507af51f5da7ef4f5b2695ed4eef8f2f12ec4c86 Author: Adrian Aichner adrian.aichner@gmail.com Date: Mon Nov 25 21:05:31 2013 +0100

Only import and export snippets via localStorage.scriptSippets.

Simplify use by skipping itermediate popup with links.
As a consequence the window cannot live inside a tab.
Add a few options to support personal preferences.
Please be aware of https://code.google.com/p/chromium/issues/detail?id=323031
when testing in canary Chrome.

commit 64449eb826ec26e614e6aacf3a0af0bd12c4113f Author: Adrian Aichner adrian.aichner@gmail.com Date: Sun Nov 3 17:20:57 2013 +0100

Add overview section for Typical Use Cases, add overview links to slide show

commit 6c6d34d89739d89070bd01a48002b943908f5ce2 Author: Adrian Aichner adrian.aichner@gmail.com Date: Sun Nov 3 17:13:13 2013 +0100

Request download settings help for navigator.language

commit e171a9371f5c7b370bf84e04f70c10000169fd3b Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 10:30:33 2013 +0100

minor fixes for links, markdown, typos.

commit e3cd836a04d5f02004cfb0be14b66c3a3f4a3d77 Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 09:30:21 2013 +0100

Fix bad fragment specifier replacement.

commit e3afcd1882208c05c758ae71893ad7e8dcbba6a5 Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 09:23:08 2013 +0100

poor man's slide show for typical use cases is in.

commit 959e37604d12f833758b383cc5d6e6e3e89b111c Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 08:55:32 2013 +0100

try fragment links

commit e4e9332382de58bbe3a8522fb4a7865846753a5f Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 08:04:22 2013 +0100

trying to stare down markdown

commit ac96525b536949159cc53c0bd03d12417759cc2c Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 07:52:40 2013 +0100

try poor man slide show

commit 52b343d7171db06e584bb170ce364c36540dcf4d Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 06:46:57 2013 +0100

Remove inline markup.

commit 904207336a2e74f9333f235c05eb8e4c429105b8 Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 06:38:59 2013 +0100

Testing png-based tutorial of snippet functionality.

commit f737869632a9addd0fdfd82225038e0c94d90682 Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 04:43:48 2013 +0100

Add screenshots for basic feature set.

GIF animation quality is poor (missing layers, missing pixes in toolbar).
Would be good if PNG files could be used instead, perhaps as a manual slide show.

commit 60a5bded9d5b853fba8e31b541f1114287fa9c0e Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 02:12:40 2013 +0100

Move devtools_import_export.js, html_i18n_content.js to their own directories.

Carry over minor changes I had made to html_i18n_content.js.

commit 692da68eb19fc7b55878bb661adbbac671c0c011 Author: Adrian Aichner adrian.aichner@gmail.com Date: Sat Nov 2 00:59:18 2013 +0100

Add header comment hopefully sufficient for adept users

commit c2b5aa9fe8f85eea261cb5a4d84f71f5d0e88e60 Author: Adrian Aichner adrian.aichner@gmail.com Date: Fri Nov 1 23:45:50 2013 +0100

Deleting all snippets works in Chrome 30 now as well.

Improve presentation of alert information for the two use cases:
To inspect localStorage
To import/export devtools source snippets

commit 9e845f98fb60fea18db92de6284fa1ae83530495 Author: Adrian Aichner adrian.aichner@gmail.com Date: Fri Nov 1 21:11:06 2013 +0100

Make user confirm successful localStorage download in delete all snippets.

commit ef563e6f406e12db8c5dd194af073512918c69c7 Author: Adrian Aichner adrian.aichner@gmail.com Date: Fri Nov 1 20:41:56 2013 +0100

delete all snippets, import snippets from localStorage download.

Dynamically updating localStorage and snippet counts.
Tested only in chrome canary.

commit 31a89ef2dbd2b235659e34cba6f1484b25c8b8b7 Author: Adrian Aichner adrian.aichner@gmail.com Date: Fri Nov 1 02:57:17 2013 +0100

move devtools_import_export.js

commit af15be0f084538b3096a8c1059c7b097f77f441f Author: Adrian Aichner adrian.aichner@gmail.com Date: Thu Oct 31 00:10:32 2013 +0100

Format JS

Comparing Format JS changes is still difficult without ignore whitespace support.

commit bdb320b75a1770b8ed597cca7b9efa58829efecc Author: Adrian Aichner adrian.aichner@gmail.com Date: Wed Oct 30 23:56:22 2013 +0100

Integrate latest functionality of collect_command_history.js

Drop window.open strWindowFeatures argument to open in tabs instead of popups, still via anchor click listeners.

commit e1333f7cd95407803fe9f106581e41403f5a50ac Author: Adrian Aichner adrian.aichner@gmail.com Date: Tue Oct 29 21:24:19 2013 +0100

Run UI in new tab, both for webpage and devtools localStorage import/export.

Need to open window from callback to open new tab instead of window.
Add backward compatibility for snippet import in Google Chrome 30 where createFile only takes three arguments.

commit 1844c420799bdf754f255fdef9695189ec028c78 Author: Adrian Aichner adrian.aichner@gmail.com Date: Tue Oct 29 11:39:34 2013 +0100

Format JS

commit b1ef3907e6981cb62d2a14abfa184c3b006f9acf Author: Adrian Aichner adrian.aichner@gmail.com Date: Mon Oct 28 21:42:40 2013 +0100

Complete import into orion with 'Import local file...' on kuckuck.

All snippets were exported to download location C:\GoogleChromeSnippets using snippet devtools_import_export.js, then drop onto orion's "import a file or zip" popup.
File input dialog does not support multiple files!

commit 4e621fcec9a7d3c9099cc1baeceabc18a58be8bf Author: Adrian Aichner adrian.aichner@gmail.com Date: Mon Oct 28 02:58:39 2013 +0100

Add comment: // .innerText contains newline characters in Chrome, while .textContent loses them.
addyosmani commented 10 years ago

:+1:

bgrins commented 10 years ago

@anaran thanks for doing this. I've made a new folder called import-export in the root and put it here, since it is a different kind of snippet than the others. It is here: https://github.com/bgrins/devtools-snippets/tree/master/import-export/chrome

anaran commented 10 years ago

It's great to see this has landed! Thank @bgrins !

I will follow up with some link mending and documentation cleanup in due course.