aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2013-10-27 21:51:24 -0400
committerTeddy Wing2013-10-27 21:51:24 -0400
commit52aea5637522d13f8e55a770140d137d23bbe718 (patch)
tree4d296adf06073b722623e9a9be04d39615235b30
parent23b2c720d149a7909f6f52d758609ff9c24a6c13 (diff)
downloadNo-More-GitHub-Neck-Cricks-for-Chrome-52aea5637522d13f8e55a770140d137d23bbe718.tar.bz2
Add code that rotates the canvas
Rotate the network graph using a WebKit CSS transform. Also change the width of the graph by setting the `height` attribute (since it's rotated) via JavaScript.
-rw-r--r--manifest.json1
-rw-r--r--network-graph.css3
-rw-r--r--network-graph.js4
3 files changed, 8 insertions, 0 deletions
diff --git a/manifest.json b/manifest.json
index 1637fae..1bdeb40 100644
--- a/manifest.json
+++ b/manifest.json
@@ -8,6 +8,7 @@
"content_scripts": [
{
"matches": ["*://*.github.com/*/*/network"],
+ "js": ["network-graph.js"],
"css": ["network-graph.css"]
}
],
diff --git a/network-graph.css b/network-graph.css
new file mode 100644
index 0000000..48f76a1
--- /dev/null
+++ b/network-graph.css
@@ -0,0 +1,3 @@
+#ng canvas {
+ -webkit-transform: rotate(270deg);
+} \ No newline at end of file
diff --git a/network-graph.js b/network-graph.js
new file mode 100644
index 0000000..7ccd534
--- /dev/null
+++ b/network-graph.js
@@ -0,0 +1,4 @@
+(function() {
+ var canvas = document.getElementById('ng').children[0];
+ canvas.setAttribute('height', 900);
+})(); \ No newline at end of file