Skip to content

Commit

Permalink
Merge pull request xthexder#5 from Martii/normalizationForSites
Browse files Browse the repository at this point in the history
Some useful things for your script :)
  • Loading branch information
xthexder committed Jun 16, 2014
2 parents 570eeae + efc63e6 commit e3aee93
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 130 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013+ xthexder (https://github.com/xthexder/wide-github)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ This script can be installed into Greasemonkey on [openuserjs.org](https://openu

Everything else:

The actual script can be found here: [wide-github.js](https://raw.github.com/xthexder/wide-github/master/wide-github.js)
The actual script can be found here: [wide-github.user.js](https://raw.githubusercontent.com/xthexder/wide-github/master/wide-github.user.js)
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Wide Github",
"description": "Change all github repository pages to be full width and dynamically sized.",
"version": "1.0.7",
"version": "1.0.8",

"permissions": [
"tabs", "https://github.com/*"
Expand All @@ -14,7 +14,13 @@
"content_scripts": [
{
"matches": ["https://github.com/*"],
"js": ["wide-github.js"]
"js": ["wide-github.user.js"]
}
],
"licenses": [
{
"type": "MIT License",
"url": "http://opensource.org/licenses/mit-license.php",
}
]
}
}
126 changes: 0 additions & 126 deletions wide-github.js

This file was deleted.

140 changes: 140 additions & 0 deletions wide-github.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
(function () {
"use strict";

// ==UserScript==
// @name Wide Github
// @namespace https://github.com/xthexder/wide-github
// @description This plugin changes all github repository pages to be full width and dynamically sized.
// @author xthexder
// @copyright 2013+, xthexder (https://github.com/xthexder)
// @contributor Jason Frey (https://github.com/Fryguy)
// @contributor Marti Martz (https://github.com/Martii)
// @license MIT License; http://opensource.org/licenses/mit-license.php
// @version 1.0.8
// @icon https://raw.githubusercontent.com/xthexder/wide-github/master/icon.png
// @homepageURL https://github.com/xthexder/wide-github
// @supportURL https://github.com/xthexder/wide-github/issues
// @include *github.com*
// @grant none
// ==/UserScript==

if (document.getElementById('js-repo-pjax-container')) {
var s = document.createElement('style');
s.type = "text/css";
s.innerHTML = ".container {" +
"width:90% !important;" +
"min-width:980px;" +
"}" +
".repository-content {" +
"width:100% !important;" +
"margin-right: auto !important;" +
"}" +

// Repository sidebar
".repository-with-sidebar {" +
"margin-left:60px;" +
"}" +
".repository-with-sidebar.with-full-navigation {" +
"margin-left:190px;" +
"}" +
".repository-with-sidebar .repository-content {" +
"margin-left:-60px;" +
"}" +
".repository-with-sidebar.with-full-navigation .repository-content {" +
"margin-left:-190px;" +
"}" +

// Repository Issues
".repository-content .discussion-timeline-cols {" + // New Issue form
"margin-left:200px;" +
"}" +
".repository-content .discussion-timeline-cols .column.main {" +
"margin-left:-200px !important;" +
"margin-right:auto !important;" +
"width:100% !important;" +
"}" +
".repository-content .discussion-timeline {" + // Issue body
"margin-right:160px;" +
"width:auto !important;" +
"float: none !important;" +
"}" +
".repository-content .inline-comments .comment-holder {" + // Diff / code comments
"max-width:none !important;" +
"}" +
".repository-content .inline-comments .inline-comment-form {" +
"max-width:none !important;" +
"}" +

// New Release form
".repository-content .new-release {" +
"margin-left:270px;" +
"}" +
".repository-content .new-release .column.main {" +
"margin-left:-270px !important;" +
"margin-right:auto !important;" +
"width:100% !important;" +
"}" +

// Repository settings tabs
".repository-content #repo-settings {" +
"margin-right:235px;" +
"}" +
".repository-content .repo-settings-content {" +
"margin-right:-235px !important;" +
"margin-left:auto !important;" +
"width:100% !important;" +
"}" +

// Repository pulse page
".repository-content .overall-summary .graphs {" + // Overview PR / Issue graphs
"display:table;" +
"width:100%;" +
"}" +
".repository-content .overall-summary .graphs .graph {" +
"border-left:1px solid #EEEEEE;" +
"width:50% !important;" +
"}" +
".repository-content .overall-summary .graphs .graph:first-child {" +
"border-right:none !important;" +
"}" +
".repository-content .overall-summary .summary-stats {" + // Overview PR / Issue counts
"display:table;" +
"width:100%;" +
"}" +
".repository-content .overall-summary .summary-stats li {" +
"width:25% !important;" +
"}" +
".repository-content .authors-and-code .section {" + // Contributors bar graph
"width:50%;" +
"}" +
".repository-content .authors-and-code .section svg {" +
"width:100%;" +
"}" +

// Repository graph page
".repository-content .capped-card {" + // Graph cards on contributors / graph list
"margin:10px 10px 0 0 !important;" +
"}" +
".repository-content .traffic-graph-stats:after {" + // Traffic view / visitor count
"content:' ';" +
"display:table;" +
"clear:both;" +
"}" +
".repository-content .traffic-graph-stats .col {" +
"display:block;" +
"float:left;" +
"width:50%;" +
"}" +
".repository-content #top-lists .col {" + // Traffic top domains / content
"display:block;" +
"float:left;" +
"width:50%;" +
"}" +
".repository-content #top-lists .col .capped-box {" +
"width:100% !important;" +
"}" +
"";
(document.head || document.documentElement).appendChild(s);
}

})();

0 comments on commit e3aee93

Please sign in to comment.