This file contains 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
// ==UserScript== | |
// @name Cambridge application statistics analyser | |
// @namespace https://gist.github.com/daniilS/ | |
// @description Go to the application statistics page, select courses or colleges, and press the button! | |
// @author daniilS | |
// @version 2 | |
// @updateURL https://gist.github.com/daniilS/0eb8ea9130822b1ff7c4eef64b53f2f5/raw/cambridge_stats.user.js | |
// @match http://www.undergraduate.study.cam.ac.uk/apply/statistics | |
// @require https://code.highcharts.com/highcharts.js | |
// @require https://code.highcharts.com/modules/exporting.js |
This file contains 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
"use strict";function diff_match_patch(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}var DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;diff_match_patch.Diff,diff_match_patch.prototype.diff_main=function(e,t,n,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var s=i;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[[DIFF_EQUAL,e]]:[];"undefined"==typeof n&&(n=!0);var r=n,o=this.diff_commonPrefix(e,t),a=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=this.diff_commonSuffix(e,t);var c=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var u=this.diff_compute_(e,t,r,s);return a&&u.unshift([DIFF_EQUAL,a]),c&&u.push([DIFF_EQUAL,c]),this.diff_cleanupMerge(u),u},diff_match_patch.prototype.diff_compute_=function(e,t,n,i){var s;if(!e)return[[DIFF_INSERT,t]];if(!t)return[[DIFF_DELETE, |
This file contains 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
//helper function | |
String.prototype.cut = function(index){ | |
return this.slice(0, index) + this.slice(index+1); | |
} | |
function longestCommonSubstring(a, b){ | |
if(a.length == 0 || b.length == 0) | |
return 0; | |
if(a == b) |
This file contains 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
// ==UserScript== | |
// @name Lecture recording silence and noise remover | |
// @namespace https://gist.github.com/daniilS/ | |
// @downloadUrl https://gist.github.com/daniilS/32ddbd3557bf34385ab6539bd4154007/raw/silenceRemover.user.js | |
// @version 2.0.0 | |
// @description Puts more effort into making online lectures tolerable than the rest of the chemistry department combined | |
// @author daniilS | |
// @include *://*.panopto.*/Panopto/Pages/Viewer.aspx* | |
// @grant GM_registerMenuCommand | |
// @grant unsafeWindow |