├── Resources ├── favicon.ico ├── Lobster.woff ├── DroidSans.woff ├── webfont.css └── added-styles.css ├── MarmoUI-Chrome ├── image │ ├── icon16.png │ ├── icon48.png │ └── icon128.png ├── MarmoUI-Chrome.zip ├── manifest.json └── scripts │ ├── notifications.js │ └── jquery.js ├── updater.css ├── VERSION.md ├── README.md └── marmo-ui.user.js /Resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/Resources/favicon.ico -------------------------------------------------------------------------------- /Resources/Lobster.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/Resources/Lobster.woff -------------------------------------------------------------------------------- /Resources/DroidSans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/Resources/DroidSans.woff -------------------------------------------------------------------------------- /MarmoUI-Chrome/image/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/MarmoUI-Chrome/image/icon16.png -------------------------------------------------------------------------------- /MarmoUI-Chrome/image/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/MarmoUI-Chrome/image/icon48.png -------------------------------------------------------------------------------- /MarmoUI-Chrome/MarmoUI-Chrome.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/MarmoUI-Chrome/MarmoUI-Chrome.zip -------------------------------------------------------------------------------- /MarmoUI-Chrome/image/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/MarmoUI/master/MarmoUI-Chrome/image/icon128.png -------------------------------------------------------------------------------- /updater.css: -------------------------------------------------------------------------------- 1 | body:not(.marmo_ui_1_3_1) .notifier-update 2 | { display : block !important; } 3 | 4 | .notifier-text-inner::before 5 | { content: 'v1.3.1 - Critical bugfix for v1.3 (Added color highlight on submission scores and passed/failed submissions)'; } -------------------------------------------------------------------------------- /Resources/webfont.css: -------------------------------------------------------------------------------- 1 | @font-face { font-family: 'Droid Sans'; 2 | font-style: normal; 3 | font-weight: 400; 4 | src: local('Droid Sans'), local('DroidSans'), url(data:application/font-woff;base64,XXXXXXXXXXXXXXXXXXXXX) format('woff'); 5 | } 6 | @font-face { 7 | font-family: 'Lobster'; 8 | font-style: normal; 9 | font-weight: 400; 10 | src: local('Lobster'), url(data:application/font-woff;base64,XXXXXXXXXXXXXXXXXXXXX) format('woff'); 11 | } -------------------------------------------------------------------------------- /MarmoUI-Chrome/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | 4 | "name": "MarmoUI", 5 | "description": "Marmoset Improved! Better UI and functionality", 6 | "version": "1.5", 7 | "icons": { 8 | "16": "image/icon16.png", 9 | "48": "image/icon48.png", 10 | "128": "image/icon128.png" 11 | }, 12 | 13 | "content_scripts": [ 14 | { 15 | "matches": ["https://*.uwaterloo.ca/*"], 16 | "include_globs": ["https://marmoset*"], 17 | "js": ["scripts/jquery.js", "scripts/script.js"] 18 | } 19 | ], 20 | 21 | "background": { 22 | "service_worker": "scripts/notifications.js" 23 | }, 24 | "permissions": ["notifications"] 25 | } 26 | -------------------------------------------------------------------------------- /VERSION.md: -------------------------------------------------------------------------------- 1 | ``` 2 | __ __ _ _ _____ 3 | | \/ | | | | |_ _| 4 | | \ / | __ _ _ __ _ __ ___ ___ | | | | | | 5 | | |\/| |/ _` | '__| '_ ` _ \ / _ \| | | | | | 6 | | | | | (_| | | | | | | | | (_) | |__| |_| |_ 7 | |_| |_|\__,_|_| |_| |_| |_|\___/ \____/|_____| 8 | 9 | ``` 10 | Version history 11 | ====== 12 | 13 | ### Version 1.1 14 | * Added auto-reload when a submission is untested 15 | * Added auto-refresh for submissions page 16 | * All submissions now uses the quick-submission box 17 | * Release-test button uses a popup confirm box instead of a page 18 | * Added update notifications 19 | * Added auto-retry when any async loading fails 20 | 21 | ### Version 1.0 22 | * Added overall UI improvement with better colors and formatting of information 23 | * Lots of useless information now hides automatically 24 | * Nice buttons! 25 | * Auto-retreve latest submission for the project page 26 | * Added quick-submission from project page -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MarmoUI 2 | 3 | 4 | Marmoset Improved! Better UI and functionality. 5 | 6 | ## Features 7 | * Auto result reloading with countdown 8 | * Color overlay indicating pass or fail 9 | * Quick submission box 10 | * Shows test results, remaining tokens and token regenerating time in main table 11 | * Overall UI improvement 12 | 13 | 14 | ## Installation procedures 15 | 16 | ### Google Chrome: 17 | * Open [MarmoUI Plugin in Chrome Web Store](https://chrome.google.com/webstore/detail/marmoui/plhonglcpnmkaafmedmbcelnbjlkmfid) and click "Add to Chrome" 18 | * Alternatively, download ["marmo-ui.user.js"](https://github.com/lishid/MarmoUI/raw/master/marmo-ui.user.js) (Right-click -> Save link as) 19 | * Go to Wrench-Menu -> Tools -> Extensions (or type in "chrome://extensions" in the url bar) 20 | * Drag and drop "marmo-ui.user.js" from where you downloaded it into the extensions page 21 | 22 | ### Mozilla Firefox: 23 | * Download and install GreaseMonkey from [Greasemonkey in Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) 24 | * Download and install ["marmo-ui.user.js"](https://github.com/lishid/MarmoUI/raw/master/marmo-ui.user.js) 25 | * Wait for the popup and click on "Install" button 26 | 27 | ### Apple Safari: 28 | * Download and install GreaseKit from [Safari Add-ons](http://safariaddons.com/en-US/safari/addon/43) 29 | * Download from [userscripts.org page](http://userscripts.org/scripts/show/157749) and click "Install" [(Direct link)](https://github.com/lishid/MarmoUI/raw/master/marmo-ui.user.js) 30 | 31 | ### Opera: 32 | * Follow the directions [here](http://www.opera.com/docs/userjs/using/#writingscripts) to setup the userscript folder 33 | * Put ["marmo-ui.user.js"](https://github.com/lishid/MarmoUI/raw/master/marmo-ui.user.js) in the userscript folder 34 | * Go to "opera:config" and search for "javascript" 35 | * Enable "User JavaScript on HTTPS" in "User Prefs" section 36 | -------------------------------------------------------------------------------- /MarmoUI-Chrome/scripts/notifications.js: -------------------------------------------------------------------------------- 1 | // Notifications which have not been closed yet 2 | var activeNotifications = {}; 3 | 4 | chrome.runtime.onMessage.addListener(function(request, sender) { 5 | 6 | if (request.type == "notification") { 7 | // Check if we have permission 8 | chrome.notifications.getPermissionLevel(function(level) { 9 | if(level == "denied") { 10 | console.warn("Notification suppressed; Permission denied.") 11 | return; 12 | } 13 | 14 | chrome.windows.get(sender.tab.windowId, function(win) { 15 | // Don't show notification if user is still on marmoset 16 | if (win.focused && sender.tab.active) return; 17 | 18 | chrome.notifications.create('', request.notification, 19 | function(notificationId) { 20 | // Add URL to activeNotifications so we can access it 21 | // on button click 22 | request.sender = sender; 23 | activeNotifications[notificationId] = request; 24 | }); 25 | }); 26 | }); 27 | } 28 | }); 29 | 30 | // Button handler for "View Results" 31 | function openResults(notificationId, buttonIndex) { 32 | 33 | // Open a new tab with the results 34 | chrome.tabs.create(activeNotifications[notificationId].options, function(tab) { 35 | 36 | // Focus new tab's window 37 | chrome.windows.update(tab.windowId, {focused: true}, function (){ }); 38 | }); 39 | 40 | // Close notification 41 | chrome.notifications.clear(notificationId, function() {}); 42 | } 43 | 44 | function notificationDeactivated(notificationId) { 45 | delete activeNotifications[notificationId]; 46 | } 47 | 48 | function focusMarmoUI(notificationId) { 49 | var windowId = activeNotifications[notificationId].sender.tab.windowId; 50 | var tabId = activeNotifications[notificationId].sender.tab.id; 51 | var pageUrl = activeNotifications[notificationId].sender.url; 52 | 53 | //check if window still exists 54 | chrome.windows.get(windowId, function() { 55 | if(!chrome.runtime.lastError) { 56 | // focus 57 | chrome.windows.update(windowId, {focused: true}, function (){}); 58 | } 59 | }); 60 | 61 | // check if tab still exists 62 | chrome.tabs.get(tabId, function() { 63 | if(!chrome.runtime.lastError) { 64 | // set active 65 | chrome.tabs.update(tabId, {active: true}, function () {}); 66 | } else { 67 | // otherwise open results at previous url 68 | chrome.tabs.create({url: pageUrl}, function(tab) { 69 | // Focus new tab's window 70 | chrome.windows.update(tab.windowId, {focused: true}, function (){ }); 71 | }); 72 | } 73 | }); 74 | 75 | // Close notification 76 | chrome.notifications.clear(notificationId, function() {}); 77 | } 78 | 79 | // Registering listeners 80 | chrome.notifications.onButtonClicked.addListener(openResults) 81 | chrome.notifications.onClosed.addListener(notificationDeactivated); 82 | chrome.notifications.onClicked.addListener(focusMarmoUI); -------------------------------------------------------------------------------- /Resources/added-styles.css: -------------------------------------------------------------------------------- 1 | /* __ __ _ _ _____ 2 | // | \/ | | | | |_ _| 3 | // | \ / | __ _ _ __ _ __ ___ ___ | | | | | | 4 | // | |\/| |/ _` | '__| '_ ` _ \ / _ \| | | | | | 5 | // | | | | (_| | | | | | | | | (_) | |__| |_| |_ 6 | // |_| |_|\__,_|_| |_| |_| |_|\___/ \____/|_____| 7 | // 8 | // Created by Shida Li and Erica Xu 9 | */ 10 | 11 | /* Style for Marmo UI written by Erica Xu (www.ericaxu.com) and Shida Li (www.lishid.com) */ 12 | 13 | body, h1, h2, h3 { 14 | font-family: 'Droid Sans', helvetica, arial, sans-serif; 15 | } 16 | 17 | body { 18 | color: #EEEEEE; 19 | background: #022d49; 20 | margin: 0; 21 | } 22 | 23 | h1, h2, h3 { 24 | margin: 1em 0 0.5em 0; 25 | font-weight: normal; 26 | } 27 | 28 | h1 { 29 | font-size: 1.7em; 30 | } 31 | 32 | h2 { 33 | font-size: 1.5em; 34 | } 35 | 36 | h3 { 37 | font-size: 1.3em; 38 | color: #EEEEEE; 39 | } 40 | 41 | .wrapper { 42 | margin: 1em 7.5%; 43 | } 44 | 45 | a:link { 46 | color: #ffcc33; 47 | -webkit-transition: all .3s ease-in-out; 48 | -moz-transition: all .3s ease-in-out; 49 | -o-transition: all .3s ease-in-out; 50 | transition: all .3s ease-in-out; 51 | } 52 | 53 | a:visited { 54 | color: #3e90c6; 55 | } 56 | 57 | a:hover { 58 | color: #ff8700; 59 | } 60 | 61 | div.header { 62 | background: #022d49; 63 | padding: 4em 0 3em 0; 64 | margin: 0; 65 | color: white; 66 | border: none; 67 | } 68 | 69 | div.header p { 70 | text-align: center; 71 | font: 4em 'Lobster', helvetica, sans-serif; 72 | padding: 0.3em; 73 | margin: 0; 74 | } 75 | 76 | div.breadcrumb { 77 | background: inherit; 78 | margin: 0; 79 | padding: 0; 80 | } 81 | 82 | div.breadcrumb p { 83 | background: inherit; 84 | font-family: 'Droid Sans', helvetica, arial, sans-serif; 85 | font-variant: normal; 86 | width: 80%; 87 | margin: 0 6% 0 0; 88 | padding: 0.5em 0 0 0; 89 | } 90 | 91 | div.logout, div.submit-button { 92 | background: #ffcc33; 93 | font-family: 'Droid Sans', helvetica, arial, sans-serif; 94 | color: #03426A; 95 | width: 7em; 96 | padding: 0.1em 0.5em; 97 | margin: 0; 98 | text-align: center; 99 | font-weight: normal; 100 | -moz-border-radius: 50px; 101 | -webkit-border-radius: 50px; 102 | border-radius: 50px; 103 | -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 91); 104 | filter: alpha(opacity = 91); 105 | -webkit-transition: all .3s ease-in-out; 106 | -moz-transition: all .3s ease-in-out; 107 | -o-transition: all .3s ease-in-out; 108 | transition: all .3s ease-in-out; 109 | cursor: pointer; 110 | } 111 | 112 | div.logout p, div.submit-button p { 113 | font-size: 1.5em; 114 | font-variant: normal; 115 | padding: 0; 116 | margin: 0.1em auto; 117 | } 118 | 119 | div.logout:hover, div.submit-button:hover { 120 | background: #eee; 121 | color: #03426A; 122 | } 123 | 124 | div.logout a { 125 | font-family: inherit !important; 126 | text-decoration: none !important; 127 | color: #03426A !important; 128 | } 129 | 130 | div.submit-button a, div.logout a { 131 | font-family: inherit; 132 | text-decoration: none; 133 | color: #111; 134 | font-weight: normal; 135 | text-align: center; 136 | display: block; 137 | padding: .2em .5em; 138 | margin: -.2em -.5em; 139 | } 140 | 141 | div.breadcrumb p.nav { 142 | font-family: 'Droid Sans', helvetica, arial, sans-serif; 143 | font-size: 1.5em; 144 | font-variant: normal; 145 | font-weight: normal; 146 | display: inline-block; 147 | padding: 0; 148 | margin: 0; 149 | } 150 | 151 | div.breadcrumb p a:link, div.breadcrumb p a:visited { 152 | color: #ffcc33; 153 | text-decoration: underline; 154 | } 155 | 156 | div.breadcrumb p a:hover { 157 | color: #ff8700; 158 | } 159 | 160 | div.footer { 161 | border-top: none; 162 | text-align: center; 163 | padding: 0.5em; 164 | margin: 1em; 165 | } 166 | 167 | div.footer a:visited { 168 | color: #fc3; 169 | } 170 | 171 | div.footer a:hover { 172 | color: #ff8700; 173 | } 174 | 175 | .notifier-update { 176 | background: #fc3; 177 | text-align: center; 178 | } 179 | 180 | .notifier-text { 181 | line-height: 3em; 182 | display: block; 183 | } 184 | 185 | .notifier-update a, .notifier-update a:visited { 186 | color: #022d49; 187 | font-weight: bold; 188 | } 189 | 190 | .notifier-close { 191 | position: absolute; 192 | top: 0; 193 | right: 0.5em; 194 | font-size: 2.0em; 195 | color: #000; 196 | text-decoration: none; 197 | } 198 | 199 | ul.my-courses, ul.all-courses { 200 | list-style: none; 201 | font-size: 1.1em; 202 | } 203 | 204 | ul.my-courses li, ul.all-courses li { 205 | margin: 0.3em 0; 206 | } 207 | 208 | ul.release-tokens { 209 | list-style: none; 210 | } 211 | 212 | table { 213 | border-style: ridge; 214 | border: none; 215 | border-collapse: collapse; 216 | width: 100%; 217 | margin: 2em 0 0 0; 218 | font-size: 1em; 219 | } 220 | 221 | form[name='submitform'] { 222 | background: #ffcc33; 223 | color: #111111; 224 | width: 45%; 225 | margin: 2em auto 0 auto; 226 | padding: 0.5em; 227 | -webkit-border-radius: 1em; 228 | -moz-border-radius: 1em; 229 | border-radius: 1em; 230 | font-size: 1.2em; 231 | text-align: center; 232 | } 233 | 234 | form[name='submitform'] p { 235 | text-align: center; 236 | font-weight: bold; 237 | } 238 | 239 | form[name='submitform'] input[type='submit'] { 240 | color: #EEEEEE; 241 | background: #022d49; 242 | height: 2em; 243 | width: 6em; 244 | -webkit-border-radius: 1em; 245 | -moz-border-radius: 1em; 246 | border-radius: 1em; 247 | border: none; 248 | cursor: pointer; 249 | -webkit-transition: all .3s ease-in-out; 250 | -moz-transition: all .3s ease-in-out; 251 | -o-transition: all .3s ease-in-out; 252 | transition: all .3s ease-in-out; 253 | } 254 | 255 | form[name='submitform'] input[type='submit']:hover { 256 | background: #25a0ca; 257 | } 258 | 259 | div.submission-bg { 260 | background: #fff; 261 | opacity: 0.7; 262 | position: fixed; 263 | width: 100%; 264 | height: 100%; 265 | top: 0; 266 | left: 0; 267 | } 268 | 269 | div.submission-wrapper { 270 | display: table; 271 | position: fixed; 272 | width: 100%; 273 | height: 100%; 274 | top: 0; 275 | left: 0; 276 | } 277 | 278 | div.submission-cell { 279 | display: table-cell; 280 | vertical-align: middle; 281 | } 282 | 283 | div.submission-popup { 284 | background-color:#fc3; 285 | color: #111; 286 | display: block; 287 | border: none; 288 | text-align: left; 289 | padding: 1.5em; 290 | z-index: 9999; 291 | width: 50%; 292 | margin: 0 25%; 293 | } 294 | 295 | div.submission-popup a:link, div.submission-popup a:visited { 296 | color: #022d49; 297 | } 298 | 299 | div.submission-popup h2 { 300 | text-align: center; 301 | } 302 | 303 | div.submission-popup h2, div.submission-popup p { 304 | color: #111; 305 | margin: 0.5em 0 1em 0; 306 | } 307 | 308 | div.submission-popup form { 309 | margin: 1em auto; 310 | } 311 | 312 | a#submission-close { 313 | margin: 0; 314 | right: 24%; 315 | position: absolute; 316 | color: #111; 317 | text-decoration: underline; 318 | } 319 | 320 | div.submission-popup div.submit-button { 321 | margin: 0.5em auto; 322 | background: #c1dbed; 323 | } 324 | 325 | div.submission-popup div.submit-button a:link { 326 | color: #fc3; 327 | text-decoration: none; 328 | } 329 | 330 | div.submission-popup div.submit-button p { 331 | margin: 0.1em auto; 332 | } 333 | 334 | div.submission-popup div.submit-button:hover { 335 | background: #eee; 336 | } 337 | 338 | table a:link { 339 | color: #03426A; 340 | font-weight: bold; 341 | } 342 | 343 | table a:visited { 344 | color: #03426A; 345 | } 346 | 347 | table a:hover { 348 | color: #ff8700; 349 | } 350 | 351 | th { 352 | background: #2c6b94; 353 | color: #EEEEEE; 354 | font-size: 1.1em; 355 | font-weight: normal; 356 | text-transform: capitalize !important; 357 | text-align: center; 358 | vertical-align: center; 359 | padding: 1em 0.5em; 360 | border: 0; 361 | margin: 0px; 362 | } 363 | 364 | td { 365 | text-align: center; 366 | vertical-align: middle; 367 | padding: 0.5em; 368 | margin: 0; 369 | border: none; 370 | } 371 | 372 | td a{ 373 | display: block; 374 | } 375 | 376 | th.description, td.description { 377 | text-align: center; 378 | } 379 | 380 | td.left { 381 | text-align: left; 382 | } 383 | 384 | td.long-result { 385 | text-align: left; 386 | } 387 | 388 | th.number, td.number { 389 | text-align: right; 390 | } 391 | 392 | col.right { 393 | border-right: 0px solid black; 394 | } 395 | 396 | .build-output { 397 | padding: 1em 2em; 398 | background: #ffe79989; 399 | color: #111; 400 | overflow-x: auto; 401 | } 402 | 403 | .build-output pre { 404 | padding: 1em 2em; 405 | letter-spacing: 1px; 406 | font-family: monospace; 407 | white-space: pre; 408 | letter-spacing: 1px; 409 | padding: 0; 410 | margin: 0; 411 | border: none; 412 | } 413 | 414 | .build-output pre span{ 415 | background: none; 416 | } 417 | 418 | form { padding: 0; margin: 0; } 419 | 420 | table.stacktrace td { 421 | padding-left: 3em; 422 | } 423 | 424 | input[type='file'], input[type='submit'], input[type='hidden'] { 425 | font-family: 'Droid Sans', helvetica, arial, sans-serif !important; 426 | font-size: 1em; 427 | } 428 | table.form td { 429 | padding: 0.25em; 430 | text-align: left; 431 | } 432 | 433 | table.form td.label { 434 | font-weight: bold; 435 | text-align: right; 436 | background: #fff9e5; 437 | padding-left: 3em; 438 | padding-right: 0.5em; 439 | } 440 | 441 | table.form tr.submit td { 442 | background: #ffcc33; 443 | text-align: center; 444 | } 445 | 446 | tr { 447 | color: #111111; 448 | -webkit-transition: all .3s ease-in-out; 449 | -moz-transition: all .3s ease-in-out; 450 | -o-transition: all .3s ease-in-out; 451 | transition: all .3s ease-in-out; 452 | } 453 | 454 | table tr:hover { 455 | background: #9ac5e1; 456 | } 457 | 458 | tr.r0 { 459 | background: #f5fbff; 460 | } 461 | 462 | tr.r1 { 463 | background: #e4f4fe; 464 | } 465 | tr.selected, tr.selected:hover { 466 | background: #ffcc33; 467 | } 468 | tr.highlight { 469 | background: #00ffaf; 470 | } 471 | td.passed { 472 | background: #5fbf5f; 473 | } 474 | td.failed { 475 | background: #9f3f3f; 476 | } 477 | td.error { 478 | background: #CC0000; 479 | } 480 | td.huh { 481 | background: #ffcc33; 482 | } 483 | td.timeout { 484 | background: #ff00ff; 485 | } 486 | td.not_implemented { 487 | background: #FFFFFF; 488 | } 489 | td.could_not_run { 490 | background: #808080; 491 | } 492 | td.warning { 493 | background: #0000df; 494 | } 495 | 496 | /* Styles for source code display */ 497 | table.codetable { 498 | border-style: none; 499 | border-width: 0px; 500 | border-collapse: collapse; 501 | margin: 0px; 502 | } 503 | table.codetable td { 504 | text-align: left; 505 | vertical-align: baseline; 506 | padding: 0px; 507 | border: none; 508 | margin: 0px; 509 | } 510 | table.codetable td.codecoveredcount { 511 | text-align: right; 512 | background: #abcabd; 513 | vertical-align: baseline; 514 | padding: 0px 2px; 515 | border: none; 516 | margin: 0px; 517 | } 518 | table.codetable td.codeuncoveredcount { 519 | text-align: right; 520 | background: #f0c8c8; 521 | vertical-align: baseline; 522 | padding: 0px 2px; 523 | border: none; 524 | margin: 0px; 525 | } 526 | table.codetable td.codeuncovered { 527 | text-align: left; 528 | background: #f0c8c8; 529 | vertical-align: baseline; 530 | padding: 0px 2px; 531 | border: none; 532 | margin: 0px; 533 | } 534 | table.codetable td.linenumber { 535 | text-align: right; 536 | background: #ffffff; 537 | vertical-align: baseline; 538 | padding: 0px 2px; 539 | border: none; 540 | margin: 0px; 541 | } 542 | .codehighlight { 543 | background: #fff3cc; 544 | } 545 | .codekeyword { 546 | color: green; 547 | font-weight: bold; 548 | } 549 | .codestring { 550 | color: fuchsia; 551 | } 552 | .codeliteral { 553 | color: fuchsia; 554 | } 555 | .codecomment { 556 | color: blue; 557 | font-style: italic; 558 | } 559 | .statusmessage { 560 | border:1px solid #cedff2; 561 | background-color:#f5faff; 562 | color:#003399; 563 | padding:7px; 564 | } -------------------------------------------------------------------------------- /MarmoUI-Chrome/scripts/jquery.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st(""); 451 | $("form").data("retries", 0); 452 | var retries = 453 | $("#sumbission-loader").load(function(){ 454 | var href = ""; 455 | try { 456 | href = $("#sumbission-loader")[0].contentWindow.location.href; 457 | } 458 | catch(err) { 459 | var retries = $("form").data("retries"); 460 | if(retries < 5) { 461 | $("form").submit(); 462 | $("form").data("retries", retries + 1); 463 | } 464 | } 465 | 466 | if(href.indexOf("marmoset.student.cs.uwaterloo") === -1) { 467 | var retries = $("form").data("retries"); 468 | if(retries < 5) { 469 | $("form").submit(); 470 | $("form").data("retries", retries + 1); 471 | } 472 | } 473 | else if($("#sumbission-loader")[0].contentWindow.location.href.indexOf("blank") === -1) { 474 | document.location.reload(true); 475 | } 476 | }); 477 | } 478 | 479 | function applyChangesAll(current_page) 480 | { 481 | //Load some nice fonts 482 | $("head").append($("").attr("type", "text/css").html("@font-face{font-family:'Droid Sans';font-style:normal;font-weight:400;src:local('Droid Sans'),local('DroidSans'),url(" + EMBED_DATA.Font_DroidSans + ") format('woff')}@font-face{font-family:'Lobster';font-style:normal;font-weight:400;src:local('Lobster'),url(" + EMBED_DATA.Font_Lobster + ") format('woff')}")); 483 | 484 | //Add the loading image 485 | $("head").append($("").attr("type", "text/css").html(".loading{background:url(" + EMBED_DATA.Loading + ") no-repeat center;}")); 486 | 487 | //Wrap contents inside a wrapper for centering 488 | $("body").wrapInner("
"); 489 | 490 | //Change page (browser) title 491 | document.title = "MarmoUI - " + document.title; 492 | //Change page title 493 | $("p:contains('Marmoset Submission and Testing Server')").html("Marmoset"); 494 | 495 | //Add the favicon 496 | $("head").append(""); 497 | 498 | //Add navigation CSS 499 | var nav = $("div.breadcrumb p:not(:contains('Logout'))").addClass("nav"); 500 | //Trim all links since some of them has spaces at the end 501 | trimInner(nav.find("a")); 502 | var navText = nav.html(); 503 | if(typeof navText != "undefined" && current_page != PAGE.LOGIN.value) 504 | { 505 | //Remove the ugly greeting if applicable 506 | navText = navText.substring(navText.indexOf(":") + 1); 507 | //Add in a link to go to the homepage 508 | navText = "Marmoset | " + navText; 509 | //Change the breadcrumb separator 510 | navText = navText.replace(/\|/g, "›"); 511 | nav.html(navText); 512 | } 513 | 514 | //Capitalize the table header for consistency 515 | $("th").css("text-transform", "capitalize"); 516 | 517 | //Remove inconsistent (and useless) greeting message 518 | $("p:contains('Welcome')").remove(); 519 | 520 | //Remove current time and replace by an actual footer 521 | $(".footer").html("MarmoUI - Created by Shida Li and Erica Xu."); 522 | 523 | //Redirect logout to the homepage since logout doesn't actually logs you out 524 | $("div.logout a").attr("href", "/"); 525 | 526 | //Fix tables not having a proper

tag 527 | $("table").each(function(index, value) 528 | { 529 | if(typeof value.parentNode === "undefined" || value.parentNode.nodeName != "P") 530 | $(value).wrap("

"); 531 | }); 532 | 533 | //Load the updater - This will only show if the updater loads and is of a different version 534 | $("head").append(""); 535 | $("body").prepend($("