#noticeDivTemp { font-family: ‘Lato’, Arial, Helvetica, Tahoma, sans-serif; } @media (min-width: 610px) { .col-sm-8-temp { width: 66.66666667%;} .col-sm-4-temp { width: 33.33333333%;} } .f20 { margin:0; font-weight: 900; } .plan-temp_desc { float: left; width:70%; } .plan-temp_btn { float: right; width:30%; font-size: 13px; margin-top:10px; } .reg-button { background: #cc3737; padding: 10px; margin: 10px auto; overflow: hidden; display: block; width: 100px; color: #fff; font-weight: 600; text-transform: uppercase; text-align: center; border: 0; -webkit-border-radius: 4px; } .paywall-access-box { text-align: center; margin-top: 10px; } .subscription-login { font-size:13px; text-align:center; } .subscription-login a { color:#107fc9; font-size: 13px; } .subscription-desc { clear:both; font-size:12px; text-align:center; } .subscription-dv { clear:both; border-color:#c0c0c0; margin:10px 10px; } @media (min-width: 768px) and (max-width:991px) { .paywall-access-box img { width: 100%; } } @media (max-width:767px) { .row { width: auto; } } @media (max-width:610px) { .plan-temp_desc { clear: none; float: left; width: 65%; } .plan-temp_btn { clear: none; float: right; width: 35%; font-size: 13px; margin-top:10px; } .reg-button { font-size: 12px; padding: 5px; width: 80px; } .paywall-access-box img { width: 100%; } .plan-temp_desc p { margin-bottom: 0; } } @media (min-width:310px) and (max-width:480px) { .paywall-access-box img { width: 50%; } }
Get 30% off with our ads free Premium Plan
iframe#ifnewsletter { margin-bottom: 0 !important; margin-top: 20px !important; }
function inlineNewsletter() {
jQuery(“#ifnewsletter”).show();
}
// if (jQuery(‘#cx_paywall’).length == 0){
if( document.getElementById(‘ifnewsletter’).src){
inlineNewsletter();
}
// }
.end-line { padding-top: 10px; padding-bottom: 20px; } .end-line span{ font-size: 1.000em; font-style: italic; } .end-line span a{ color: #107fc9; font-weight: 400; }
var email = ”;
var story_id = $(“meta[name=’content_id’]”).attr(“content”);
var story_headline = $(“meta[name=’content_title’]”).attr(“content”);
var story_link = $(“meta[name=’url’]”).attr(“content”);
var story_section = $(“meta[property=’article:section’]”).attr(“content”);
var feedback_key = “feedback”;
$(document).ready(function(){
feedback_toggleEmail();
expireFeedback(feedback_key);
var existingItems = JSON.parse(localStorage.getItem(feedback_key)) || [];
var itemExist = false;
existingItems.forEach(function(e, index){
if( story_id == e.id ){
itemExist = true;
}
});
if(itemExist){
$(“#feedback-form”).hide();
$(“#feedback-thanks”).show();
$(‘#reportArticle’).attr(‘style’,””);
$(‘#reportArticle’).addClass(“in”);
}
});
function feedback_get() {
grecaptcha.ready(function() {
grecaptcha.execute(‘6LfoZ8IUAAAAAMEbQ30xLwuzgSD08tra8cwz6ggA’, {action: ‘submit’}).then(function(token) {
var ttl = 1209600000; //1209600000 //14 days
var subject = ”;
var rbIssue = $(‘input[name=”feedback-issue”]:checked’).val();
var rbIssueName = $(‘input[name=”feedback-issue”]:checked’).attr(“data-val”);
var txtComment = $(‘#feedback-comment’).val();
var txtEmail = ”;
var time = moment().format(‘DD-MM-YY HH:mm:ss’);
subject = time + ” – (” + story_section + “) ” + rbIssueName
var captcha_response = token;
var errorIssue = false;
if (rbIssue === undefined) {
errorIssue = true;
$(‘#errIssue’).css(‘display’, ‘inline’);
} else {
errorIssue = false;
$(‘#errIssue’).css(‘display’, ‘none’);
}
var errorComment = false;
if (txtComment == ”) {
errorComment = true;
$(‘#errComment’).css(‘display’, ‘inline’);
} else {
errorComment = false;
$(‘#errComment’).css(‘display’, ‘none’);
}
var errorEmail = false;
if (email == ”) {
txtEmail = $(‘#feedback-email’).val();
if (txtEmail !== ”) {
var pattern = new RegExp(/^([w-.]+@([w-]+.)+[w-]{2,4})?$/);
if (!pattern.test(txtEmail)) {
errorEmail = true;
$(‘#errEmailFormat’).css(‘display’, ‘inline’);
} else {
errorEmail = false;
$(‘#errEmailFormat’).css(‘display’, ‘none’);
}
}else{
txtEmail =”noreply@thestar.com.my”;
}
}else{
txtEmail = email;
errorEmail = false;
}
if (!captcha_response) {
$(‘#errCaptcha’).show();
} else {
$(‘#errCaptcha’).hide();
}
if (!errorIssue && !errorEmail && !errorComment && captcha_response) {
document.getElementById(“report-article-submit-btn”).disabled = true;
$.ajax({
url: ‘/emailArticleFeedback’,
type: “POST”,
data: { rbIssue: rbIssue, rbIssueName: rbIssueName, txtComment: txtComment, txtEmail: txtEmail, captcha_response: captcha_response, subject: subject, story_headline: story_headline, story_link: story_link, story_section: story_section },
success: function (response) {
if (response.is_error) {
//console.log(“response: error block”);
if (response.score {
grecaptcha.render(‘recaptchaV2’, {
‘sitekey’ : ‘6LckEw0TAAAAAA5DR34Iq6PIcV4lbtzix3K0XqmF’
});
});
}
function feedback_getV2() {
var ttl = 1209600000; //1209600000 //14 days
var subject = ”;
var rbIssue = $(‘input[name=”feedback-issue”]:checked’).val();
var rbIssueName = $(‘input[name=”feedback-issue”]:checked’).attr(“data-val”);
var txtComment = $(‘#feedback-comment’).val();
var txtEmail = ”;
var time = moment().format(‘DD-MM-YY HH:mm:ss’);
subject = time + ” – (” + story_section + “) ” + rbIssueName
var captcha_response = grecaptcha.getResponse();
var errorIssue = false;
if (rbIssue === undefined) {
errorIssue = true;
$(‘#errIssue’).css(‘display’, ‘inline’);
} else {
errorIssue = false;
$(‘#errIssue’).css(‘display’, ‘none’);
}
var errorComment = false;
if (txtComment == ”) {
errorComment = true;
$(‘#errComment’).css(‘display’, ‘inline’);
} else {
errorComment = false;
$(‘#errComment’).css(‘display’, ‘none’);
}
var errorEmail = false;
if (email == ”) {
txtEmail = $(‘#feedback-email’).val();
if (txtEmail !== ”) {
var pattern = new RegExp(/^([w-.]+@([w-]+.)+[w-]{2,4})?$/);
if (!pattern.test(txtEmail)) {
errorEmail = true;
$(‘#errEmailFormat’).css(‘display’, ‘inline’);
} else {
errorEmail = false;
$(‘#errEmailFormat’).css(‘display’, ‘none’);
}
}else{
txtEmail =”noreply@thestar.com.my”;
}
}else{
txtEmail = email;
errorEmail = false;
}
if (!captcha_response) {
$(‘#errCaptcha’).show();
} else {
$(‘#errCaptcha’).hide();
}
if (!errorIssue && !errorEmail && !errorComment && captcha_response) {
document.getElementById(“report-article-submit-btnV2”).disabled = true;
$.ajax({
url: ‘/emailArticleFeedbackV2’,
type: “POST”,
data: { rbIssue: rbIssue, rbIssueName: rbIssueName, txtComment: txtComment, txtEmail: txtEmail, captcha_response: captcha_response, subject: subject, story_headline: story_headline, story_link: story_link, story_section: story_section },
success: function (response) {
console.log(“is_error :” + response.is_error);
if (response.is_error) {
document.getElementById(“report-article-submit-btnV2”).disabled = false;
console.log(“response: error block”);
$(‘#alert-error’).show();
$(‘#alert-error’).html(response.message);
$(‘#alert-error’).delay(5000).fadeOut();
}
else {
console.log(“response: no_error block”);
setFeedback(feedback_key, story_id, ttl);
$(“#feedback-form”).hide();
console.log(“form hide”);
$(“#feedback-thanks”).show();
console.log(“tq form show”);
}
},
error: function (jqXHR, textStatus, errorThrown) {
console.log(‘/emailArticleFeedbackV2 : ‘ + jqXHR.responseText);
}
});
}
}
function feedback_reset(){
$(‘input[name=”feedback-issue”]’).prop(‘checked’, false);
$(‘#feedback-comment’).val(“”);
$(‘#alert-success’).hide();
$(‘#alert-error’).hide();
if (email == ”) {
$(‘#feedback-email-div’).show();
$(‘#feedback-email’).val(“”);
}else{
$(‘#feedback-email-div’).hide();
}
$(‘#reportArticle’).attr(‘style’,”height: 0px;”);
$(‘#reportArticle’).removeClass(“in”);
$(‘#feedback-accordion’).addClass(“collapsed”);
}
function feedback_toggleEmail() {
if (email == ”) {
$(‘#feedback-email-div’).show();
}else{
$(‘#feedback-email-div’).hide();
}
}
function expireFeedback(key) {
var arr = [];
var items = JSON.parse(localStorage.getItem(key)) || [];
if (!items) {
return null;
}
const now = new Date();
items.forEach(function(e, index){
if (now.getTime() > e.exp) {
arr.push(index);
}
});
for (let i of arr.sort().reverse()) {
items.splice(i, 1);
}
localStorage.setItem(key, JSON.stringify(items));
}
function setFeedback(key, value, ttl) {
var now = new Date()
var item = {
id: value,
exp: now.getTime() + ttl,
}
var existingItems = JSON.parse(localStorage.getItem(key)) || [];
var itemExist = false;
existingItems.forEach(function(e, index){
if( value == e.id ){
itemExist = true;
}
});
if(!itemExist){
existingItems.push(item);
localStorage.setItem(key, JSON.stringify(existingItems));
}
}
.widget–article-report .btn–disabled { background-color: #dfdfdf; } .widget–article-report .panel-heading [data-toggle=”collapse”]:after { font-family: ‘FontAwesome’; content: “f0d8″; float: right; font-size: 14px; line-height: 22px; position: absolute; right: 12px; top: 10px; } .widget–article-report .panel-heading [data-toggle=”collapse”]:after { content: “f077″; font-weight: 100; } .widget–article-report .panel-heading [data-toggle=”collapse”].collapsed:after { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg); color: #454444; } .widget–article-report .panel-heading [data-toggle=”collapse”]:after { top: 24px; } .widget–article-report .panel-heading { position: relative; padding: 15px; background-color: var(–color-bg-2); color: var(–color-on-bg-2); border-color: var(–color-border); border-top-right-radius: 0px; border-top-left-radius: 0px; } .widget–article-report .panel-heading h4.panel-title a { color: var(–color-text); font-size: 18px; margin-bottom: 4px; display:block; } .widget–article-report .panel-heading p { margin: 0; line-height: 16px; } .widget–article-report .panel-body { padding: 20px; border: 1px solid var(–color-border); border-top: 0 !important; } .widget–article-report .panel-body textarea { font-size: 16px; } .widget–article-report .panel-body .form–report .btn–confirm { margin-right: 4px; } .widget–article-report .panel-body .form–thanks { display: none; } .widget–article-report .form-control { background-color: var(–color-bg-2); color: var(–color-on-bg-2); border-color: var(–color-border); } .widget–article-report .form-control.txt { height: 35px; margin-top: 10px; margin-bottom: 15px; font-size: 16px; } .grecaptcha-badge { bottom:64px !important; }
$(document).ready(function(){
if ($(window).width() >= 1024) {
$.get(“https://api.cxense.com/public/widget/data?json=%7B%22widgetId%22%3A%2254aaff126eb002491eaa07aecde1d51cee28be16%22%2C%22user%22%3A%7B%22ids%22%3A%7B%22usi%22%3A%22%22%7D%7D%2C%22prnd%22%3A%22lqegh65ti86h1sbsdo3m%22%7D”,
function(data ,status){
if (data.items[0].title) {
if (data.items[0].title == ‘related-stories-side-div’) {
if ($(‘#related-stories-resp-div’).length) {
$(‘#related-stories-resp-div’).hide();
}
if ($(‘#related-stories-div’).length) {
$(‘#related-stories-div’).hide();
}
}
else {
if ($(‘#related-stories-resp-div’).length) {
$(‘#related-stories-resp-div’).hide();
}
if ($(‘#related-stories-side-div’).length) {
$(‘#related-stories-side-div’).hide();
}
}
}
else {
if ($(‘#related-stories-div’).length) {
$(‘#related-stories-div’).hide();
}
if ($(‘#related-stories-side-div’).length) {
$(‘#related-stories-side-div’).hide();
}
if ($(‘#related-stories-resp-div’).length) {
$(‘#related-stories-resp-div’).hide();
}
}
})
.fail(function(xhr, status, error) {
if ($(‘#related-stories-div’).length) {
$(‘#related-stories-div’).hide();
}
if ($(‘#related-stories-side-div’).length) {
$(‘#related-stories-side-div’).hide();
}
if ($(‘#related-stories-resp-div’).length) {
$(‘#related-stories-resp-div’).hide();
}
});
}
else {
if ($(‘#related-stories-div’).length) {
$(‘#related-stories-div’).hide();
}
if ($(‘#related-stories-side-div’).length) {
$(‘#related-stories-side-div’).hide();
}
}
});
(function ($) {
function GetCookieForLogin(loginCookieName) {
var theLoginCookieName = loginCookieName + “=”;
var lcn = document.cookie.split(‘;’);
for(var i=0; i 1) {
var patt = /(&eed=w+)/;
var result = patt.test(loginCookieVal);
if (result)
{showLock = false;}
}
var ct = $(“meta[name=content_tier]”).attr(“content”);
var ct_section = $(‘meta[name=article_section_name]’).attr(“content”);
if (!(ct === ‘Premium’ && ct_section === ‘Business’)) { $(‘#related-sbp-stories-div’).hide(); } // show only when business and premium
else {
$.ajax({
type: ‘GET’,
url: ‘https://cdn.thestar.com.my/Components/StarBizPremium/starBizPremium.json’,
jsonpCallback: ‘starbizPremiumJsonCallback’,
contentType: “application/json”,
dataType: ‘jsonp’,
success: function (jobj) {
if (jobj.items && jobj.items.length === 0) { return; } // no need to continue processing below if jobj is empty
var strBizPreHead = ‘
More Stories
‘;
$(‘#bizpremorestories’).append(strBizPreHead);
var skip = 0;
var rowCounter = 0;
var curTitle = $(“meta[name=content_title]”).attr(“content”);
for (var x = 0; x < 4; x++) {
if (rowCounter == 3) { break; }
if (curTitle.indexOf(jobj.items[x].headline) !== -1) {
skip = 1;
} else {
rowCounter++;
var strBldr = '
‘
‘
‘‘ +
‘
‘;
$(‘#related-sbp-stories-list’).append(strBldr);
}
}
rowCounter = 0;
for (var x = 3+skip; x < 7+skip; x++) {
if (rowCounter == 3) { break; }
if (curTitle.indexOf(jobj.items[x].headline) !== -1) {
continue;
} else {
rowCounter++;
var strBldr2 = '
‘
‘
‘‘ +
‘
‘;
$(‘#related-sbp-stories-list2’).append(strBldr2);
}
}
},
error: function () {
console.log(“An error occur at StarBiz Premium More Stories component”);
},
timeout: 15000
});
}
});
})(jQuery);