I wanted to play some Starcraft on my MacBook Pro running Mac OS 10.8. The CD I have has the class Mac OS version. The Mac OS X PowerPC version does not work due to Rosetta being removed (Apple - please don't make this mistake again in Mac OS 11). Is there a way to make Starcraft work on Mac OS 10.8? I would prefer not to use emulators.
Get the OS X patch from here:
https://macintoshgarden.org/games/starcraft
The user agent of Safari on iPadOS beta is at this point exactly the same as Safari on macOS. Is there any other way to tell an iPad from a Mac?
iPad running iOS
Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G60 Safari/602.1
iPadOS, developer beta 1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS, beta 2, simulator
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS, beta 3, (simulator)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS, developer beta 3
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS, developer beta 4
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS 13.1, developer beta 1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS 13.1, developer beta 2
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
iPadOS 13.1, developer beta 3
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15
iPadOS 13.1, developer beta 4
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15
macOS Catalina
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
macOS (older version)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15
macOS Catalina developer beta 7
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
macOS Catalina developer beta 8
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15
When playing HLS video, the iPadOS agent seems to be:
AppleCoreMedia/1.0.0.17A5821e (iPad; U; CPU OS 13_1 like Mac OS X; en_us)
I'm using this test client side:
if (navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2) {
...must be iPad OS...
Since there's no official touch screen for Mac, it seems pretty safe. The actual value of maxTouchPoints on the iPad is 5, BTW.
I would not generally recommend this, and I haven't tested it much (using something similar in production since September 2019), but one way could be to detect the existence of TouchEvent on the client side, and match it with the state of the user agent to account for older iOS versions of iPad:s. YMMV. Likely not very future safe.
function isIpad() {
const ua = window.navigator.userAgent;
if (ua.indexOf('iPad') > -1) {
return true;
}
if (ua.indexOf('Macintosh') > -1) {
try {
document.createEvent("TouchEvent");
return true;
} catch (e) {}
}
return false;
}
I'm using this works fine:
const ua = window.navigator.userAgent.toLowerCase();
const isiPad = ua.indexOf('ipad') > -1 || ua.indexOf('macintosh') > -1 && 'ontouchend' in document;
as #Jonny mentioned you can try and detect touch events, this is the solution i currently use
function isTouchDevice() {
if (typeof window === 'undefined') return false
const prefixes = ' -webkit- -moz- -o- -ms- '.split(' ')
function mq(query) {
return typeof window !== 'undefined' && window.matchMedia(query).matches
}
if ('ontouchstart' in window || (window?.DocumentTouch && document instanceof DocumentTouch)) return true
const query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('') // include the 'heartz' - https://git.io/vznFH
return mq(query)
}
interesting post on detecting touch events
and another note, Firefox on Ipad uses the same safari user-agent :/
Meta
OS: macOS High Sierra
Selenium Version: 3.9.0
Browser: Chrome
Browser Version: 64.0.3282.167 (Official Build) (64-bit)
Problem
I'm using Ruby and the Selenium WebDriver to view a webpage using headless Chrome.
I need to change the user agent for my project. On my local computer, I can easily do this via the add_argument method in Selenium::WebDriver::Chrome::Options:
options = Selenium::WebDriver::Chrome::Options.new()
options.add_argument('--headless')
options.add_argument('--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36')
driver = Selenium::WebDriver.for(:chrome, options: options)
puts driver.execute_script('return navigator.userAgent')
This (correctly) returns:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
However, when I push this code to my Heroku app and run the same code*, suddenly here's what gets returned:
Mozilla/5.0
I have spent a ton of time trying all kinds of fixes. Pretty early on I realized this was probably some kind of escaping issue, so I looked up how to escape spaces and (I think) have tried absolutely everything: backslashes, double-backslashes, quotes, double-quotes, etc. None of it has worked.
I even tried:
options.add_argument('--user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36"')
Which only returned:
"Mozilla/5.0
As far as I can tell, absolutely any user agent I pass as an option will get cut off at the first space.
Am I missing something obvious here?
Thank you!
*The only change I make to the code running on Heroku is that I have to slightly update the first line of code above to point the Heroku app to the Chrome binary:
options = Selenium::WebDriver::Chrome::Options.new(binary: ENV['GOOGLE_CHROME_SHIM'])
Wish I could take credit for this, but I actually got the answer in a Chromedriver forum: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2276#c7.
In short, the Heroku buildpack I've been using had a bug that prevented arguments with spaces from being parsed correctly.
This line...
exec \$HOME/.apt/opt/google/$BIN --headless --no-sandbox --disable-gpu --remote-debugging-port=9222 \$#
...should have looked like this:
exec \$HOME/.apt/opt/google/$BIN --headless --no-sandbox --disable-gpu --remote-debugging-port=9222 "\$#"
I've since filed a PR that will fix the issue.
In the meantime, anyone can use my forked version of the buildpack, which I've verified parses the user agent correctly.
I want to make ssh connection between macOS and Windows(exclude Windows Subsystem for Linux, I'm asking about just Windows) with bluetooth.
Is there a way to do it?
I want to work Both Computers as a client and server.
In macOS, I'll use pre-installed ssh and sshd command, And https://github.com/PowerShell/Win32-OpenSSH/ use as windows ssh toolset.
I apologize that I am Japanese so My English is broken.
The following is environment of my computers.
(PC)
OS: Windows 10 Home x64
Bluetooth adapter: Intel Dual Band Wireless-AC 7260 for Desktop 7260HMWDTX1.R
(Mac)
Hardware: Mid 2012 MacBook Pro
OS: macOS 10.12.6
Supporting Bluetooth version: 4.0 (it maybe wrong?)
No, it is not possible to make an SSH connection over Bluethooth. SSH requires TCP / IP and Bluethooth does not support TCP / IP.
I am working with ruby gem "firewatir (1.6.5)" and mozilla
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-1.fc11 Firefox/3.5.9.<\i>
I have installed the jssh.*.xpi extension for mozilla 3.5 for Linux and it works for sometime.
But the problem is that after running some scripts I get the error that "failed to telnet to localhost at port 9997".After this, sometimes re-installing the extension works, but sometimes it does not.
Is there any other way of ensuring that the jssh extension works?
Thanks and Regards,
Anjali C. G.
Did not play with Watir on Linux a lot, but the last time I have tried to drive Firefox with watir-webdriver, it worked just fine: http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/