Menu
Code:
.postpagination span {
float: left;
display: inline;
margin-left: 4px;
padding: 0 8px;
height: 26px;
border: 1px solid;
border-color: #C2D5E3;
background-color: #FFF;
background-repeat: no-repeat;
color: #333;
overflow: hidden;
text-decoration: none;
margin: 0 4px 0 0;
line-height: 26px;
cursor: pointer;
font-weight: normal;
}
.postpagination span:hover {
border-color: #369;
color: #369;
}
.postpagination span.pp_current {
background-color: #E5EDF2;
border-color: #C2D5E3;
color: #333;
font-weight: bold;
}
.postpagination {
display: block;
font: 12px/1.5 Tahoma,Helvetica,'SimSun',sans-serif;
}
.postpagination:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
div.postpagination { margin: 10px 0 }
span.postpagination span {
float: none;
padding: 0 4px;
font-size: 0.8em;
margin: 0 2px 0 0;
}
.postpagination span.pp_next {
padding-right: 25px;
background-image: url(http://i.imgur.com/2C4dvL5.gif);
background-position: 90% 50%;
}
span.postpagination span.pp_next {
padding-right: 12px;
background-position: 90% 50%;
}
Code:
$(function() {
var x= "selecteur_suivant_version";
if($("#text_editor_textarea").length && $.sceditor) {
$(function() {
if(!$("#text_editor_textarea").sceditor("instance")) {
return
}
$('<a class="sceditor-button" unselectable="on" title="Page"><div unselectable="on" style="background:url(http://i.imgur.com/a3RgTJc.gif);opacity:1">Page</div></a>').insertAfter(".sceditor-button-fahide").click(function(e) {
$("#text_editor_textarea").sceditor("instance").insertText("[page]")
})
})
}
var c, y, g = function(a) {
var b;
a = document.createElement(a);
b = "getComputedStyle" in window;
document.body.appendChild(a);
b = (b ? window.getComputedStyle(a, "") : a.currentStyle).display;
document.body.removeChild(a);
return b
}, t = function(o) {
if(o.tagName == "CODE") {
return
}
if(!o.hasChildNodes()) {
return
}
var a = 0;
var p = [0];
var i;
for(i = 0;i < o.childNodes.length;i++) {
c = o.childNodes[i];
if(c.nodeType == 1) {
p.push(c);
t(c)
}else {
if(c.nodeType == 3 && c.nodeValue.indexOf("[page]") != -1) {
while((y = c.nodeValue.indexOf("[page]")) != -1) {
if(y != 0) {
p.push(document.createTextNode(c.nodeValue.substr(0, y)))
}
p.push(0);
a++;
c.nodeValue = c.nodeValue.substr(y + 6)
}
p.push(c)
}else {
p.push(c)
}
}
}
if(a == 0) {
return
}
var b = g(o.tagName) == "block";
for(i = 0;i < p.length;i++) {
if(p[i] === 0) {
y = document.createElement(b ? "DIV" : "SPAN");
y.className = "postpage";
o.appendChild(y)
}else {
y.appendChild(p[i])
}
}
$("> .postpage", o).not(":first").hide();
y = document.createElement(b ? "DIV" : "SPAN");
y.className = "postpagination";
$(y).append('<span class="pp_current">1</span><span>2</span>');
if(a > 1) {
$(y).append("<span>... " + (a + 1) + "</span>")
}
if(b) {
$(y).append('<span class="pp_next">Suivant</span><span class="pp_all">Voir tout</span>')
}else {
$(y).append('<span class="pp_next"></span>')
}
o.appendChild(y);
$(y).on("click", "span", function() {
if($(this).hasClass("pp_all")) {
$(this).parent().parent().children().show();
$(this).parent().remove();
return
}
var pagin = $(this).parent();
var num = parseInt($(".pp_next", pagin).prev().text().replace(/ ?\.\.\. ?/, ""));
var cur = parseInt($(".pp_current", pagin).text().replace(/ ?\.\.\. ?/, ""));
if($(this).hasClass("pp_next")) {
cur += 1
}else {
cur = parseInt($(this).text().replace(/ ?\.\.\. ?/, ""))
}
if(cur < 1) {
cur = 1
}else {
if(cur > num) {
cur = num
}
}
$(".pp_next", pagin).prevUntil().remove();
if(cur < num - 1) {
$(pagin).prepend("<span>... " + num + "</span>")
}else {
if(cur == num) {
$(pagin).prepend('<span class="pp_current">' + num + "</span>")
}
}
if(cur < num) {
$(".pp_next", pagin).show();
$(pagin).prepend('<span class="pp_current">' + cur + "</span><span>" + (cur + 1) + "</span>")
}else {
$(".pp_next", pagin).hide()
}
if(cur > 1) {
$(pagin).prepend("<span>" + (cur - 1) + "</span>");
if(cur > 2) {
$(pagin).prepend("<span>1 ...</span>")
}
}
$(".postpage", $(pagin).parent()).hide();
$(".postpage", $(pagin).parent()).eq(cur - 1).show()
})
};
$(x).each(function() {
t(this)
})
});
Code:
div.postbody .content
Code:
div.postbody
Code:
div.postbody div.post-entry
Code:
div.post-entry .entry-content > div
Code:
http://forum.forumactif.com/t355762-pagination-dans-un-message?highlight=pagination
Code:
$(function(){
$(function(){
$('<a class="sceditor-button sceditor-button-fahide-hotrofm" unselectable="on"><div unselectable="on">Hide</div></a>').insertAfter('.sceditor-button-fahide').click(function(){
$('#text_editor_textarea').sceditor("instance").insertText("(You need to reply to see the hidden content)[hide]","[/hide]");
});
});
$("body").prepend("<style>.sceditor-button-fahide-hotrofm div {background-position: 0 -692px;}.sceditor-button-fahide {display: none !important;}</style>");
});
Code:
$(function(){
$(function(){
$('<a class="sceditor-button sceditor-button-fahide-hotrofm" unselectable="on"><div unselectable="on">Hide</div></a>').insertAfter('.sceditor-button-fahide').click(function(){
$('#text_editor_textarea').sceditor("instance").insertText("[img]https://i37.servimg.com/u/f37/19/53/09/53/unlock10.gif[/img][hide]","[/hide]");
});
});
$("body").prepend("<style>.sceditor-button-fahide-hotrofm div {background-position: 0 -692px;}.sceditor-button-fahide {display: none !important;}</style>");
});
Code:
$(window).load(function() {
$('.sceditor-group:last').append('<a title="jsfiddle bbcode" class="sceditor-button sceditor-button-jsfiddle" style="text-indent: 0px;"><img src="http://i.imgur.com/YKo9kd5.png" ></a>');
$('body').append('<div id="bbcodejsfiddle" style="display:none;position:absolute;z-index:50000;-moz-background-clip:padding;-moz-border-radius:2px;-moz-box-shadow:1px 2px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-webkit-border-radius:2px;-webkit-box-shadow:1px 2px 4px rgba(0,0,0,.2);background:#fff;background-clip:padding-box;border:1px solid #ccc;border-radius:2px;box-shadow:1px 2px 4px rgba(0,0,0,.2);color:#333;line-height:1;padding:10px;position:absolute;z-index:4000"><input id="inputFieldjsfiddle" type="text"><br><input id="enterContentjsfiddle" type="submit" value="enter" style="margin-top: 5px;"></div><style>.jsfiddlehotro {width: 100%;}</style>');
$('.sceditor-button-jsfiddle').click(function() {
if ($('#bbcodejsfiddle').css('display') == 'none') {
var y = $('.sceditor-button-jsfiddle').offset().top +25;
var x = $('.sceditor-button-jsfiddle').offset().left;
$('#bbcodejsfiddle').show().css('top',y + 'px').css('left',x + 'px');
}
else $('#bbcodejsfiddle').hide();
});
$('#enterContentjsfiddle').click(function() {
if ($('#inputFieldjsfiddle').val().length > 0) $('#text_editor_textarea').sceditor('instance').insertText('[table class=jsfiddlehotro][tr][td]' + $('#inputFieldjsfiddle').val(),'[/td][/tr][/table]');
else $('#text_editor_textarea').sceditor('instance').insertText("[table class=jsfiddlehotro][tr][td]", "[/td][/tr][/table]");
$('#inputFieldjsfiddle').val('');
$('#bbcodejsfiddle').hide();
});
$('.sceditor-button:not(.sceditor-button-jsfiddle), .sceditor-container textarea, .sceditor-container jsfiddle').click(function() { $('#bbcodejsfiddle').hide() });
});
$(document).on('ready', function() {
$(".jsfiddlehotro a[href*='http://jsfiddle.net/'], .jsfiddlehotro a[href*='https://jsfiddle.net/']").replaceWith(function() {
return '<iframe width="100%" height="300" src="' + this.href + 'show/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>'
});
});
Code:
https://jsfiddle.net/kgtohgs3/
Code:
function doGet(e) {
return HtmlService.createHtmlOutputFromFile('form.html');
}
function uploadFiles(form) {
try {
var dropbox = "Student Files"; // tên thư mục trong Google Drive
var folder, folders = DriveApp.getFoldersByName(dropbox);
if (folders.hasNext()) {
folder = folders.next();
} else {
folder = DriveApp.createFolder(dropbox);
}
var blob = form.myFile;
var file = folder.createFile(blob);
file.setDescription("Uploaded by " + form.myName);
return "File uploaded successfully " + file.getUrl();
} catch (error) {
return error.toString();
}
}
Code:
<form id="myForm">
<input type="text" name="myName" placeholder="Your name..">
<input type="file" name="myFile">
<input type="submit" value="Upload File"
onclick="this.value='Uploading..';
google.script.run.withSuccessHandler(fileUploaded)
.uploadFiles(this.parentNode);
return false;">
</form>
<div id="output"></div>
<script>
function fileUploaded(status) {
document.getElementById('myForm').style.display = 'none';
document.getElementById('output').innerHTML = status;
}
</script>
<style>
input { display:block; margin: 20px; }
</style>
Code:
$(window).load(function() {
$('.sceditor-group:nth-child(4)').prepend('<a class="sceditor-button sceditor-button-upfilePop-hotrofm" title="Úp File"><div style="background:url(http://i.imgur.com/LLgXFFc.gif) no-repeat center;"></div></a>');
$('.sceditor-button-upfilePop-hotrofm').click(function(){
var left = ($(window).width() / 2) - (300 / 2),
top = ($(window).height() / 2) - (300 / 2),
popup = window.open("link khoanh đỏ", "popup", "width=400, height=300, top=" + top + ", left=" + left);
});
});
Code:
<script src='link js vừa tạo'></script>
Code:
;window['FormData'] && $(function(){$(function(){
var imgur_client_id = 'Thay ID ở Đây'; // you will get it via http://api.imgur.com/oauth2/addclient
var current = 0, uploaded, xhrs, file_selector, button = $('.sceditor-button-servimg').off().click(function(){
if(current) return finish();
if(!file_selector) file_selector = $('<input type="file" multiple/ accept="image/*">').css({position:'absolute', top:-100}).appendTo('body').change(function (e) {
var files = e.target.files, fd, len;
uploaded = [], xhrs = [];
for (var i = 0, len = files.length; i < len; i += 1) {
if (files[i].type.indexOf('image/') && files[i].type !== 'application/pdf') continue;
current++;
fd = new FormData();
fd.append('image', files[i]);
(function(xhr){
var num = i, xhr = jQuery.ajaxSettings.xhr();
xhrs.push(xhr);
xhr.open('POST', 'https://api.imgur.com/3/image');
xhr.setRequestHeader('Authorization', 'Client-ID '+imgur_client_id);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) return;
current--;
if (xhr.status === 200) {
var res = JSON.parse(xhr.responseText);
uploaded[num] = res.data.link;
}
if(!current) finish();
};
xhr.send(fd);
})();
}
if(current) button.css({background:'url(http://i.imgur.com/EMsOJtZ.gif) no-repeat'});
});
file_selector.click();
return false;
}).children();
var finish = function(){
for(var i=0; i < xhrs.length; i++) {
if(xhrs[i].readyState == 4) continue;
xhrs[i].onreadystatechange = function(){};
xhrs[i].abort();
}
for(var i=0; i < uploaded.length; i++) {
if(uploaded[i] === undefined) continue;
$('body').find('.sceditor-button-image').click().end().find('.sceditor-insertimage').find('#image').val(uploaded[i]).end().find('input.button').click();
$('#text_editor_textarea').sceditor('instance').insertText('\n');
}
button.removeAttr('style');
current = 0;
file_selector.wrap('<form>').closest('form').get(0).reset();
file_selector.unwrap();
return false;
};
})});
Code:
$(window).load(function() {
$('.sceditor-group:nth-child(4)').prepend('<a class="sceditor-button sceditor-button-upanh-hotrofm" title="Úp ảnh"><div></div></a>');
$('.sceditor-button-upanh-hotrofm').click(function() {
if ($('#upanhhotrofmPop').css('display') == 'none') {
var y = $('.sceditor-button-upanh-hotrofm').offset().top +25;
var x = $('.sceditor-button-upanh-hotrofm').offset().left;
$('#upanhhotrofmPop').show().css('top',y + 'px').css('left',x + 'px');
}
else $('#upanhhotrofmPop').hide();
});
$( ".sceditor-button-servimg" ).remove();
$('body').append('<div id="upanhhotrofmPop" style="display:none;position:absolute;z-index:50000;"><iframe src="http://www.domain.com/h1-page" scrolling="auto" allowtransparency="true" frameborder="0" width="300" height="400">Update your browser for tinypic.com</iframe></div><style>.sceditor-button-upanh-hotrofm div {background-position: 0 -644px;}</style>');
});
Code:
<script src="link.js" type="text/javascript">
|
|