NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

var apiurl = 'http://localhost:5000/api/';
var baseHref = 'http://localhost:5000/';

function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds) {
break;
}
}
}


function formatDate(date) {
var d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();

if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;

return [year, month, day].join('-');
}

function formatDate2(date) {
var d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();

if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;

return [day, month, year].join('-');
}

function setTableSearch(tblName) {

$('#' + tblName + ' tfoot th').each(function() {
var title = $('#' + tblName + ' thead th').eq($(this).index()).text();
$(this).html('<input type="text" placeholder="Ara ' + '" />');
});
var table = $('#' + tblName).DataTable({
"pageLength": 15,
"retrieve": true,
"destroy": true,
"deferRender": false,
"dom": 'Bfrtip',
"buttons": [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5',
'print'
]
});
table.columns().every(function() {
var that = this;
$('input', this.footer()).on('keyup change', function() {
that
.search(this.value)
.draw();
});
});
$('#' + tblName + '_filter').css("display", "none");

}
//* tarih inputlarında kullanılabilir tarihin günlük olarak çekilmesini sağlar.
$.nowDate = function (element) {
{
var today = new Date();
document.getElementById(element).value = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2);
}
}
$.nowDate2 = function () {
var dtToday = new Date();

var month = dtToday.getMonth() + 1;
var day = dtToday.getDate();
var year = dtToday.getFullYear();
if (month < 10)
month = '0' + month.toString();
if (day < 10)
day = '0' + day.toString();

var maxDate = year + '-' + month + '-' + day;
return maxDate;
}
// gönderilen tarihten önce ki tarih seçimini bloklamak için..
$.selectedDateBlockPast = function (date_) {
var sDate = new Date(date_);

var month = sDate.getMonth() + 1;
var day = sDate.getDate();
var year = sDate.getFullYear();
if (month < 10)
month = '0' + month.toString();
if (day < 10)
day = '0' + day.toString();

var selectDate = year + '-' + month + '-' + day;
return selectDate;

}
//nowDate in 1 gün sonrası
$.terminFutureMinDate = function () {
var dtToday = new Date();

var month = dtToday.getMonth() + 1;
var day = dtToday.getDate() + 1;
var year = dtToday.getFullYear();
if (month < 10)
month = '0' + month.toString();
if (day < 10)
day = '0' + day.toString();

var maxDate = year + '-' + month + '-' + day;
return maxDate;
}



$.closeSwal = function () {
setTimeout(function () { swal.close(); }, 428);
}
$(document).ready(function () {
$.showSwal = function (title) {
Swal.fire({
position: 'center',
title: title,
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false
});
Swal.showLoading();
}
$.swalWarning=function(title,content){
Swal.fire({
icon: 'error',
title: title,
text: content,

})

}



//setTimeout(function(){ alert("Hello"); }, 3000);


$.getFormattedDate = function (date, callBack) {
var d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();

if (month.length < 2)
month = '0' + month;
if (day.length < 2)
day = '0' + day;

callBack([day, month, year].join('/'));

}


$.uploadFile = function (method, page, _data, callBack) {

var settings = {
"url": apiurl + page,
"type": method,
"processData": false,
"contentType": false,
"data": _data,
"headers": {
"person_token": localStorage.getItem('person_token')
}
};
$.ajax(settings).done(function (response) {
console.log('donenData : ');
console.dir(response);
if (!response.status) {
if (response.message.indexOf("login olmalısınız") >= 0) {
window.location.href = baseHref + "/login.html";
}
else
alert(response.message);
}
else {

callBack(response);
}

});
};
$.uploadFileUser = function (method, page, _data, callBack) {

var settings = {
"url": apiurl + page,
"type": method,
"processData": false,
"contentType": false,
"data": _data,
"headers": {
"user_token": localStorage.getItem('user_token')
}
};
$.ajax(settings).done(function (response) {
console.log('donenData : ');
console.dir(response);
if (!response.status) {
if (response.message.indexOf("login olmalısınız") >= 0) {
window.location.href = baseHref + "/login.html";
}
else
alert(response.message);
}
else {

callBack(response);
}

});
};

$("#inputRemove").click(function () {
$('#postform').trigger("reset");
$('#postform1').trigger("reset");
});
$("#yeniKayitBtn").click(function () {
$('#postform').trigger("reset");
$('#postform1').trigger("reset");
});

$.getData = function (method, page, _data, callBack) {

var settings = {
"url": apiurl + page,
"method": method,
"timeout": 0,
"data": JSON.stringify(_data),
"headers": {
"Content-Type": "application/json",
"user_token": localStorage.getItem('token')
}
};
console.log(settings.headers.person_token);
$.ajax(settings).done(function (response) {
if (!response.status) {
if (response.message.indexOf("login olmalısınız") >= 0) {
if (window.location.href.indexOf("panel") >= 0) {
window.location.href = baseHref + "/panel/login";
}
else {
window.location.href = baseHref + "/login";
}
}
else
alert(response.message);
}
else {
callBack(response);
}

});


};


$.getDataUser = function (method, page, _data, callBack) {

var settings = {
"url": apiurl + page,
"method": method,
"timeout": 0,
"data": JSON.stringify(_data),
"headers": {
"Content-Type": "application/json",
"user_token": localStorage.getItem('token')
}
};
console.log(localStorage.getItem('user_token'));
$.ajax(settings).done(function (response) {
if (!response.status) {
if (response.message.indexOf("login olmalısınız") >= 0) {
window.location.href = baseHref + "/login";
}
else
alert(response.message);
}
else {
callBack(response);
}

});


};

});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.