Skip to content

Commit

Permalink
shift title to main column
Browse files Browse the repository at this point in the history
  • Loading branch information
demetrios-koziris committed Dec 27, 2016
1 parent ad64002 commit fde280f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/css/profLinks.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#page-title {
padding-top: 0px !important;
}

.mcen-profDiv {
margin: 6px 0px;
}
Expand Down
6 changes: 6 additions & 0 deletions src/js/addProfLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ The GNU General Public License can also be found at <http://www.gnu.org/licenses

function makeProfLinks() {

if (isNewStyle) {
const pageTitle = document.getElementById('page-title');
const mainColumn = document.getElementById('main-column');
mainColumn.insertBefore(pageTitle, mainColumn.firstChild);
}

terms = {
'Fall': {
'code': 9,
Expand Down
16 changes: 8 additions & 8 deletions src/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ if (url.match(/.+www\.mcgill\.ca\/study\/.+/)) {

const start = Date.now();

courseNameRegex = /([A-Z]{3,4}[0-9]{0,1})\s([0-9]{3}[A-Za-z]{0,1}[0-9]{0,1})/g;
isNewStyle = document.getElementsByClassName("transition").length > 0;
urlYearF = parseInt(url.match(/.+(20[0-9][0-9])-.+/)[1]);
urlYearW = urlYearF+1;
urlYears = urlYearF + "-" + urlYearW;
sysYear = new Date().getFullYear();
sysMonth = new Date().getMonth();
var courseNameRegex = /([A-Z]{3,4}[0-9]{0,1})\s([0-9]{3}[A-Za-z]{0,1}[0-9]{0,1})/g;
var isNewStyle = document.getElementsByClassName("transition").length > 0;
var urlYearF = parseInt(url.match(/.+(20[0-9][0-9])-.+/)[1]);
var urlYearW = urlYearF+1;
var urlYears = urlYearF + "-" + urlYearW;
var sysYear = new Date().getFullYear();
var sysMonth = new Date().getMonth();
var lang = 'en';
if (url.match(/\/fr\//)) {
lang = 'fr';
Expand All @@ -41,7 +41,7 @@ if (url.match(/.+www\.mcgill\.ca\/study\/.+/)) {

if (url.match(/.+study.+courses.+[-]+/)) {

termNames = {
var termNames = {
'en': {
9: 'Fall',
1: 'Winter',
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "McGill Enhanced",
"author": "Demetrios Koziris",
"manifest_version": 2,
"version": "3.0.289",
"version": "3.0.30",
"description": "Enhance the functionality of McGill.ca",
"permissions" : [
"declarativeContent",
Expand Down

0 comments on commit fde280f

Please sign in to comment.