BeeSoc

Инструмент для Beeline

Ajankohdalta 28.10.2019. Katso uusin versio.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        BeeSoc
// @namespace   BeeSoc
// @name:ru     BeeSoc
// @description:ru     Инструмент для Beeline
// @description:en     Tool for Beeline
// @include     https://*.beeline.ru/*
// @version     1.3|0.1
// @grant       none
// @author      NULL|Народ
// @description Инструмент для Beeline
// ==/UserScript==
$('body').prepend(`
<style>
.zTool {
margin: 10px;
}
.zTool * {
margin: 5px;
}
.zTool pre {
    white-space: pre-wrap;
    word-wrap: break-word;}
</style>
`);
if (~$('body').text().indexOf('Войдите, чтобы получить доступ к вашим персональным данным.')) {
$('body').prepend(`<div class="zTool"><b>Авторизируйтесь для пользования инструментом!</b></div>`);
} else {
$('body').prepend(`
<div class="zTool">
<hr>
<section id="blockOff">
Адрес: <input id="URLz" class="URIoff" size="100%" type="text">
<hr>
<table id="dataoff">
	<tbody>
		<tr>
			<td>Имя:</td>
			<td>Значение:</td>
		</tr>
		<tr class="get">
			<td><input type="text" value="downsellOfferType" size="30"></td>
			<td><input type="text" value="Discount" size="50"></td>
		</tr>
		<tr class="get">
			<td><input type="text" value="serviceSoc" size="30"></td>
			<td><input type="text" value="12TMDIS90" size="50"></td>
		</tr>
	</tbody>
</table>
<hr>
<ul>
<table>
	<tbody>
		<tr>
			<td>
				<li><b>12TMDIS70</b> - Скидка 70% на год</li>
				<li><b>12TMDIS80</b> - Скидка 80% на год</li>
				<li><b>12TMDIS90</b> - Скидка 90% на год</li>	
			</td>
			<td>
				<li><b>BEEUNLRF0</b> - Безлимитные звонки Билайн</li>
				<li><b>SMSUNLRF0</b> - Безлимитные СМС</li>
				<li><b>CVMUNLIMC</b> - Безлимитный интернет</li>
				<li><b>4G_PRO182</b> - Безлимит в 4G - 6 мес</li>
			</td>
			<td>
				<li><b>Народные SOC</b></li>
				<li><b>Присылайте - добавим</b></li>
				<li><b>[email protected]</b></li>
			</td>
		</tr>
	</tbody>
</table>
</ul>
<hr>
<button onclick="send('off')">GO</button>
</section>
<hr>
<span style="display: none" id="zLoading">Отправляем запрос...</span>
<b id="zOtvetText" style="display:none">Ответ:</b>
<pre id="zOtvet"></pre>
<script>
function send(type) {
var data = [];
$('#data'+type+' tbody tr.get').each(function() {
data[$(this).find('td:nth-child(1) input').val()] = $(this).find('td:nth-child(2) input').val();
});
data = Object.assign({}, data);
$('#zLoading').show();
$('#zOtvetText').hide();
$('#zOtvet').hide();
$.ajax({
	          url: $('.URI'+type).val(),
	          type: 'POST',
	          contentType: "application/json;charset=UTF-8",
	          data: JSON.stringify(data),
complete: function(jqXHR, textStatus) {
    switch (jqXHR.status) {
        case 200:
$('#zLoading').hide();
$('#zOtvetText').show();
$('#zOtvet').show().html(JSON.stringify(jqXHR));
        break;
        default:
$('#zLoading').hide();
$('#zOtvetText').show();
$('#zOtvet').show().html('Какая-то ошибка!');
    }
}
	    });
}
</script>
</div>
`);
document.getElementById('URLz').value = "https://"+document.domain+"/mobiledownsale/upsaleconnect";
}