GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 25ce49...508dc3 )
by Flávio
12s
created

$(document).ready   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
nc 2
nop 3
dl 0
loc 4
rs 10
1
$(document).ready(function(){
2
	//Prepara menu de edição para formatação de texto. O quarto parâmetro é função a ser executada após edição no texto pelo menu, e os parâmetros são: a caixa editável, dados da seleção e exec (true/false, informando se o commando foi suportado)
3
	$(".menu-edit").formatTxt(function(){return $(this).parent().find(".box-txt")}, null, null, function(cx, slc, exc){
4
		ShowMessage(cx, slc, exc);
5
	});
6
	//Remove eventos e dados aplicados do plugin "MultiformTextEditor"
7
	//$.fn.formatTxt.destroy($(.menu-edit"));
8
	
9
	//Função padrão de resposta ao uso do plugin "formatTxt()" para atualizar e exibir mensagem de formatação não suportada
10
	function ShowMessage(cx, slc, exc){
11
		cx.keyup();//-->usado para atualizar dado, mas futuramente não será necessário quando evento "input" (detector de qualquer mudança) funcionar em todos os navegadores
12
		exc == false ? alert("Not supported - The command was not executed by this browser. If possible, upgrade to a newer version.") : null;
13
	}
14
15
	//Estrutura para exibição do menu flutuante de edição inline, ao usuário selecionar texto
16
	var pageX;
17
	var pageY;
18
	!window.x ? x = {} : null;
0 ignored issues
show
Bug introduced by
The variable x seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.x.
Loading history...
19
	x.Selector = {};
0 ignored issues
show
Bug introduced by
The variable x seems to not be initialized for all possible execution paths.
Loading history...
20
	x.Selector.getSelected = function() {
21
		var t = '';
22
	if(window.getSelection) {
23
			t = window.getSelection();
24
		}else if(document.getSelection) {
25
			t = document.getSelection();
26
		}else if(document.selection) {
27
			t = document.selection.createRange().text;
28
		}
29
		return t;
30
	}
31
	$("#box-txt-inline").on("mousedown", function(e){
32
		pageX = e.pageX;
33
		pageY = e.pageY;
34
		$('.mn-inline').fadeOut(200);
35
	});
36
	$("#box-txt-inline").on("mouseup", function() {
37
		var selectedText = x.Selector.getSelected();
0 ignored issues
show
Bug introduced by
The variable x seems to not be initialized for all possible execution paths.
Loading history...
38
		if(selectedText != ''){
39
			$('.mn-inline').css({'left': (pageX<$(window).width()-$('.mn-inline').width()-10 ? pageX+5 : pageX-$('.mn-inline').width()-20), 'top': pageY-60}).fadeIn(200);
40
		}
41
	});
42
43
	//Aplica a exibição de rótulo estilizado pelo plugin Tooltipster
44
	$(".menu-edit > *[title]").tooltipster({position: "top", delay: 500, speed: 100, theme: "tooltipster-light-shadow", iconTouch: false});//seta para todos os elementos filhos do menu com atributo "title"
45
	$(".menu-edit > * *[title]").tooltipster({position: "bottom", delay: 300, speed: 100, theme: "tooltipster-light-small", iconTouch: false});//seta para todos os elementos netos do menu com atributo "title"
46
});