This repository was archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fixes to /tools and /tools/chrome-devtools + three new tips #1510
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
66318eb
small fix that adds hard whitespace so the tools heading is not squis…
pbakaus 4e72604
two tools related fixes to optimize SEO for DevTools
pbakaus 0cd23c9
fixed the feed path for devtools and tools
pbakaus 9848f40
fixed a bug with the importer for tips and imported 3 new tips
pbakaus e00f1f3
fixed a bad link in the DevTools nav
pbakaus a368474
fixed wording and markdown issues with the latest dev tips
pbakaus 2d47123
Merge branch 'master' into tools_fixes
pbakaus e4d3d9a
fix merge
pbakaus 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
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
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
66 changes: 66 additions & 0 deletions
66
src/_langs/en/updates/2015-08-10-5-tricks-to-use-in-the-console-panel.markdown
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,66 @@ | ||
| --- | ||
| rss: false | ||
| layout: update | ||
| published: true | ||
| title: Five tricks to use in the Console Panel | ||
| date: 2015-08-10 | ||
| article: | ||
| written_on: 2015-08-10 | ||
| updated_on: 2015-08-10 | ||
| authors: | ||
| - umarhansa | ||
| collection: updates | ||
| type: tip | ||
| category: tools | ||
| product: chrome-devtools | ||
| featured-image: /web/updates/images/2015-08-10-5-tricks-to-use-in-the-console-panel/five-console-tricks.gif | ||
| source_name: DevTips | ||
| source_url: https://umaar.com/dev-tips/29-five-console-tricks/ | ||
| teaserblocks: | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| permalink: /updates/2015/08/10/5-tricks-to-use-in-the-console-panel.html | ||
| --- | ||
| <img src="/web/updates/images/2015-08-10-5-tricks-to-use-in-the-console-panel/five-console-tricks.gif" alt="Five tricks to use in the Console Panel"> | ||
|
|
||
| #### Use the inspect() command to jump straight to a passed-in DOM node | ||
|
|
||
| {% highlight javascript %} | ||
| inspect($('p')) | ||
| {% endhighlight %} | ||
|
|
||
| #### Use the copy() command to copy text to your clipboard | ||
|
|
||
| {% highlight javascript %} | ||
| copy(Object.keys(window)) | ||
| // stores ["top", "window", "location", "external"... and so on | ||
| {% endhighlight %} | ||
|
|
||
| #### Style your console output | ||
|
|
||
| {% highlight javascript %} | ||
| console.log('%cHello world', 'font-size:40px;color:#fff;text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15);'); | ||
| {% endhighlight %} | ||
|
|
||
| #### Get the values of an object | ||
|
|
||
| {% highlight javascript %} | ||
| values({ | ||
| one: 1, | ||
| two: 2, | ||
| three: 3 | ||
| }) | ||
|
|
||
| // logs [1, 2, 3] | ||
| {% endhighlight %} | ||
|
|
||
| #### Clear the console | ||
|
|
||
| <kbd class="kbd">Cmd + K</kbd> (Ctrl + L on Windows) |
42 changes: 42 additions & 0 deletions
42
src/_langs/en/updates/2015-08-10-easily-duplicate-dom-nodes.markdown
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,42 @@ | ||
| --- | ||
| rss: false | ||
| layout: update | ||
| published: true | ||
| title: Easily duplicate DOM nodes | ||
| date: 2015-08-10 | ||
| article: | ||
| written_on: 2015-08-10 | ||
| updated_on: 2015-08-10 | ||
| authors: | ||
| - umarhansa | ||
| collection: updates | ||
| type: tip | ||
| category: tools | ||
| product: chrome-devtools | ||
| featured-image: /web/updates/images/2015-08-10-duplicate-dom-nodes/gplus-8f4a2ba4.png | ||
| source_name: DevTips | ||
| source_url: https://umaar.com/dev-tips/58-duplicate-dom/ | ||
| teaserblocks: | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| permalink: /updates/2015/08/10/easily-duplicate-dom-nodes.html | ||
| --- | ||
| <img src="/web/updates/images/2015-08-10-duplicate-dom-nodes/duplicate-dom.gif" alt="Duplicate DOM nodes"> | ||
|
|
||
| <em>These are essentially cut/copy and paste operations.</em> | ||
|
|
||
| You can easily change the DOM without having to edit the HTML as a giant string. | ||
|
|
||
| 1. Right click on a node and select <em>Copy</em>. | ||
| 2. You can paste in your code editor, or for prototyping, you can paste the DOM node elsewhere in the DOM tree. The pasted node is inserted as a child of the currently selected node. In the video, I use the left arrow key to jump to the immediate parent opening tag and paste there (which is what I do in most cases). | ||
|
|
||
| You can also Cut (right click > Cut, Cmd + x/Ctrl + x) a DOM node and paste - which has the effect of moving the node. | ||
|
|
||
| <em>Experiment:</em> Try adding more links in the header/footer of a site using this copy and paste technique and figure out at which point the layout needs improving. |
40 changes: 40 additions & 0 deletions
40
src/_langs/en/updates/2015-08-10-edit-html-in-the-console-panel.markdown
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,40 @@ | ||
| --- | ||
| rss: false | ||
| layout: update | ||
| published: true | ||
| title: Edit HTML in the Console Panel | ||
| date: 2015-08-10 | ||
| article: | ||
| written_on: 2015-08-10 | ||
| updated_on: 2015-08-10 | ||
| authors: | ||
| - umarhansa | ||
| collection: updates | ||
| type: tip | ||
| category: tools | ||
| product: chrome-devtools | ||
| featured-image: /web/updates/images/2015-08-10-edit-html-in-the-console-panel-of-devtools/gplus-8f4a2ba4.png | ||
| source_name: DevTips | ||
| source_url: https://umaar.com/dev-tips/60-console-edit-html/ | ||
| teaserblocks: | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| - heading: "" | ||
| description: "" | ||
| image: "" | ||
| permalink: /updates/2015/08/10/edit-html-in-the-console-panel.html | ||
| --- | ||
| <img src="/web/updates/images/2015-08-10-edit-html-in-the-console-panel-of-devtools/console-edit-html.gif" alt="Edit HTML in the Console Panel of DevTools"> | ||
|
|
||
| The DOM node context menu, which you may recognize from the elements panel, is also present in the console panel. | ||
|
|
||
| <ol> | ||
| <li>Log a DOM node to the console.</li> | ||
| <li>Right click on it.</li> | ||
| <li>Select Edit as HTML or Edit Text.</li> | ||
| <li>Notice the DOM is updated on the page and also in the Elements Panel.</li> | ||
| </ol> |
Binary file added
BIN
+1.24 MB
.../images/2015-08-10-5-tricks-to-use-in-the-console-panel/five-console-tricks.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.03 MB
src/_langs/en/updates/images/2015-08-10-duplicate-dom-nodes/duplicate-dom.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.78 KB
src/_langs/en/updates/images/2015-08-10-duplicate-dom-nodes/gplus-8f4a2ba4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.56 KB
src/_langs/en/updates/images/2015-08-10-duplicate-dom-nodes/twitter-c6557484.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.49 MB
...ges/2015-08-10-edit-html-in-the-console-panel-of-devtools/console-edit-html.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.78 KB
...images/2015-08-10-edit-html-in-the-console-panel-of-devtools/gplus-8f4a2ba4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.56 KB
...ages/2015-08-10-edit-html-in-the-console-panel-of-devtools/twitter-c6557484.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
This smells really bad - why is this needed?
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.
I wanted "tools" to be the h1 for semantic/SEO purposes, then discovered that our minification process blows away the white-space around the tags. I know this looks ugly :/ I'd be all ears for a better suggestion.