< type='text/javascript'>
//
(function(){
// Generated by CoffeeScript 1.8.0
// You can detect mobile carrier with this class
// carrier = CarrierHandler.determineCarrier(navigator.userAgent);
// Carrier has two methods isSmartPhone and isTablet
// carrier.isSmartPhone
// => true only when the carrier is SmartPhone
// carrier.isTablet
// => true only when the carrier is Tablet
var CarrierHandler,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
CarrierHandler = (function() {
var AbstractMobile, Android, AndroidTablet, BlackBerry, CARRIERS, Ipad, Iphone, Pc, SmartPhone, Tablet, WindowsPhone;
function CarrierHandler() {}
AbstractMobile = (function() {
function AbstractMobile() {}
AbstractMobile.USER_AGENT_REGEXP = null;
AbstractMobile.isSmartPhone = false;
AbstractMobile.isTablet = false;
AbstractMobile.uaType = ';
return AbstractMobile;
})();
SmartPhone = (function(_super) {
__extends(SmartPhone, _super);
function SmartPhone() {
return SmartPhone.__super__.constructor.apply(this, arguments);
}
SmartPhone.isSmartPhone = true;
SmartPhone.uaType = 'sp';
return SmartPhone;
})(AbstractMobile);
Tablet = (function(_super) {
__extends(Tablet, _super);
function Tablet() {
return Tablet.__super__.constructor.apply(this, arguments);
}
Tablet.isTablet = true;
Tablet.uaType = 'tb';
return Tablet;
})(AbstractMobile);
Pc = (function(_super) {
__extends(Pc, _super);
function Pc() {
return Pc.__super__.constructor.apply(this, arguments);
}
Pc.uaType = 'pc';
Pc.USER_AGENT_REGEXP = /./;
return Pc;
})(AbstractMobile);
// Convert Jpmobile::Mobile.carrier definitions to JS class
Docomo = (function(_super) {
__extends(Docomo, _super);
function Docomo() {
return Docomo.__super__.constructor.apply(this, arguments);
}
Docomo.USER_AGENT_REGEXP = /^DoCoMo/;
return Docomo;
})(Pc);
Au = (function(_super) {
__extends(Au, _super);
function Au() {
return Au.__super__.constructor.apply(this, arguments);
}
Au.USER_AGENT_REGEXP = /^(?:KDDI|UP.Browser\/.+?)-(.+?) /;
return Au;
})(Pc);
Softbank = (function(_super) {
__extends(Softbank, _super);
function Softbank() {
return Softbank.__super__.constructor.apply(this, arguments);
}
Softbank.USER_AGENT_REGEXP = /^(?:SoftBank|Semulator)/;
return Softbank;
})(Pc);
Vodafone = (function(_super) {
__extends(Vodafone, _super);
function Vodafone() {
return Vodafone.__super__.constructor.apply(this, arguments);
}
Vodafone.USER_AGENT_REGEXP = /^(Vodafone|Vemulator)/;
return Vodafone;
})(Pc);
Emobile = (function(_super) {
__extends(Emobile, _super);
function Emobile() {
return Emobile.__super__.constructor.apply(this, arguments);
}
Emobile.USER_AGENT_REGEXP = /^emobile\/|^Mozilla\/5.0 \(H11T; like Gecko; OpenBrowser\) NetFront\/3.4$|^Mozilla\/4.0 \(compatible; MSIE 6.0; Windows CE; IEMobile 7.7\) S11HT$/;
return Emobile;
})(Pc);
Willcom = (function(_super) {
__extends(Willcom, _super);
function Willcom() {
return Willcom.__super__.constructor.apply(this, arguments);
}
Willcom.USER_AGENT_REGEXP = /^Mozilla\/3.0\(WILLCOM/;
return Willcom;
})(Pc);
Ddipocket = (function(_super) {
__extends(Ddipocket, _super);
function Ddipocket() {
return Ddipocket.__super__.constructor.apply(this, arguments);
}
Ddipocket.USER_AGENT_REGEXP = /^Mozilla\/3.0\(DDIPOCKET/;
return Ddipocket;
})(Pc);
Ipad = (function(_super) {
__extends(Ipad, _super);
function Ipad() {
return Ipad.__super__.constructor.apply(this, arguments);
}
Ipad.USER_AGENT_REGEXP = /iPad/;
return Ipad;
})(Tablet);
AndroidTablet = (function(_super) {
__extends(AndroidTablet, _super);
function AndroidTablet() {
return AndroidTablet.__super__.constructor.apply(this, arguments);
}
AndroidTablet.USER_AGENT_REGEXP = /((?!Android.+Mobile)Android)|(Android.+SC-01C)/;
return AndroidTablet;
})(Tablet);
Iphone = (function(_super) {
__extends(Iphone, _super);
function Iphone() {
return Iphone.__super__.constructor.apply(this, arguments);
}
Iphone.USER_AGENT_REGEXP = /iPhone/;
return Iphone;
})(SmartPhone);
Android = (function(_super) {
__extends(Android, _super);
function Android() {
return Android.__super__.constructor.apply(this, arguments);
}
Android.USER_AGENT_REGEXP = /Android/;
return Android;
})(SmartPhone);
WindowsPhone = (function(_super) {
__extends(WindowsPhone, _super);
function WindowsPhone() {
return WindowsPhone.__super__.constructor.apply(this, arguments);
}
WindowsPhone.USER_AGENT_REGEXP = /Windows Phone/;
return WindowsPhone;
})(SmartPhone);
BlackBerry = (function(_super) {
__extends(BlackBerry, _super);
function BlackBerry() {
return BlackBerry.__super__.constructor.apply(this, arguments);
}
BlackBerry.USER_AGENT_REGEXP = /BlackBerry/;
return BlackBerry;
})(SmartPhone);
WindowsTablet = (function(_super) {
__extends(WindowsTablet, _super);
function WindowsTablet() {
return WindowsTablet.__super__.constructor.apply(this, arguments);
}
WindowsTablet.USER_AGENT_REGEXP = /Trident.+Touch/;
return WindowsTablet;
})(Tablet);
FirefoxOS = (function(_super) {
__extends(FirefoxOS, _super);
function FirefoxOS() {
return FirefoxOS.__super__.constructor.apply(this, arguments);
}
FirefoxOS.USER_AGENT_REGEXP = /Mozilla.+Mobile/;
return FirefoxOS;
})(SmartPhone);
CARRIERS = [Docomo, Au, Softbank, Vodafone, Emobile, Willcom, Ddipocket, Ipad, AndroidTablet, Iphone, Android, WindowsPhone, BlackBerry, WindowsTablet, FirefoxOS];
CarrierHandler.determineCarrier = function(userAgent) {
return CARRIERS.filter(function(carrier) {
return carrier.USER_AGENT_REGEXP.test(userAgent);
}).shift();
};
return CarrierHandler;
})();
// Add current UA type to URL
//
function buildBackToLinkTag(uaType) {
var p = document.createElement('p');
var a = document.createElement('a');
var t = document.createTextNode('返????????網??畫??);
a.href = backToLink(uaType);
a.appendChild(t);
p.appendChild(a);
a.className = 'b-btn b-btn-sd-view';
p.id = 'back_to_mobile_view';
return p.outerHTML;
}
// http://www.rakuten.com.tw/
// => http://www.rakuten.com.tw/?ua=sp
// http://www.rakuten.com.tw/?l-id=xxx
// => http://www.rakuten.com.tw/?l-id=xxx&ua=sp
// http://www.rakuten.com.tw/?l-id=xxx&ua=pc
// => http://www.rakuten.com.tw/?l-id=xxx&ua=sp
function backToLink(uaType) {
var origin = location.href.split('?')[0];
return origin;
}
var carrier = CarrierHandler.determineCarrier(navigator.userAgent);
var matched = document.cookie.match(/;?ua=(pc|sp|tb);?/);
if (matched && matched[1] !== carrier.uaType ) {
// Write 'back to mobile view' button only when UA not equal current view mode(ua cookie).
document.write(buildBackToLinkTag(carrier.uaType));
}
})()
//]]>
class='b-ttl-main'
title='????媽媽餃????東寶??豬??????水?? 25??/ ?? 就在 紀媽媽餃??"
ng-non-bindable
>
????媽媽餃????東寶??豬??????水?? 25????
TOP