<commit_before>// Configure your github-plugin
var configuration = {
	// What's your name, guy?
	"username": 'SFantasy',
	// How much information you wanna show?
	"repo_num": '5',
	"follower_num": '5',
	"following_num": '5'
};

var $ = function(str) {
	return document.getElementById(str);
};

var USER_NAME,
	URL = 'https://api.github.com/users/',
	REPO_NUM,
	FOLLOWER_NUM,
	FOLLOWING_NUM;

var init = function() {
	USER_NAME = configuration.username;
	REPO_NUM = configuration.repo_num;
	FOLLOWER_NUM = configuration.follower_num;
	FOLLOWING_NUM = configuration.following_num;
	URL += USER_NAME;

	bindEvent();
	Main.getUserInfo();
	Main.getRepoInfo();
	Main.getFollower();
	Main.getFollowing();
};

var bindEvent = function() {
	var ps = $('pluginSwitch').children,
		si = $('switchItems').children;

	function switchTab(i) {
		ps[i].onclick = function() {
			for(var p = 0; p < si.length; p++) {
				if(p == i) {
					ps[p].classList.add('current-tab');
					si[p].classList.toggle('current-item');
				} else {
					ps[p].classList.remove('current-tab');
					si[p].classList.remove('current-item');
				}
			}
		};
	}

	for(var i = 0; i < ps.length; i++) {
		switchTab(i);
	}<commit_msg>hide the plugin when you scroll<commit_after>// Configure your github-plugin
var configuration = {
	// What's your name, guy?
	"username": 'SFantasy',
	// How much information you wanna show?
	"repo_num": '5',
	"follower_num": '5',
	"following_num": '5'
};

var $ = function(str) {
	return document.getElementById(str);
};

var USER_NAME,
	URL = 'https://api.github.com/users/',
	REPO_NUM,
	FOLLOWER_NUM,
	FOLLOWING_NUM;

var init = function() {
	USER_NAME = configuration.username;
	REPO_NUM = configuration.repo_num;
	FOLLOWER_NUM = configuration.follower_num;
	FOLLOWING_NUM = configuration.following_num;
	URL += USER_NAME;

	bindEvent();
	Main.getUserInfo();
	Main.getRepoInfo();
	Main.getFollower();
	Main.getFollowing();
};

var bindEvent = function() {
	var ps = $('pluginSwitch').children,
		si = $('switchItems').children;

	function switchTab(i) {
		ps[i].onclick = function() {
			for(var p = 0; p < si.length; p++) {
				if(p == i) {
					ps[p].classList.add('current-tab');
					si[p].classList.toggle('current-item');
				} else {
					ps[p].classList.remove('current-tab');
					si[p].classList.remove('current-item');
				}
			}
		};
	}

	for(var i = 0; i < ps.length; i++) {
		switchTab(i);
	}

	function removeItems() {
		for(var t = 0; t < si.length; t++) {
			si[t].classList.remove('current-item');
		}
	}
	
	if(window.onscroll) {
		window.onscroll = removeItems();
	} else {
		document.onscroll = removeItems();
	}
{'fraction_non_alphanumeric': 0.1779467680608365, 'fraction_numerical': 0.004182509505703422, 'mean_word_length': 3.845303867403315, 'pattern_counts': {'":': 8, '<': 8, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5976510', 'n_tokens_mistral': 1077, 'n_tokens_neox': 975, 'n_words': 192}